nicferrier/elnode — pull request #4 by jschaf (2011-11-10 11:39:09+00:00)
Title: Docstring fixes and infinite redirects

What's up Nic,

I updated a bunch of the docstring to use some additional elisp conventions, namely surrounding functions with tex style single quotes (`text') so they get hyperlinked in the docs.

I found two bugs. The first is in `elnode-normalize-path` to add slashes to all urls not ending in an extension. I added a not clause to the if statement to switch the logic and prevent infinite redirects that add a trailing slash each time.

The second is the in ``elnode--mapper-find``. The loop macro used ``finally return`` and would return the last mapping regardless of whether it matched or not. Also, you need to use `^` in all regexps to prevent partial matches, especially when matching the root. `$` matches all strings. To match just the root you must use ``^$``.