Skip to content

Commit

Permalink
fix up CamelCaseLinks regex
Browse files Browse the repository at this point in the history
  • Loading branch information
jchris committed Aug 12, 2010
1 parent d30dbe0 commit a55524e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions evently/wiki/edit/partials/help.html
Expand Up @@ -11,6 +11,8 @@ <h3>Markdown basics:</h3>
This is a paragraph, which is text surrounded by whitespace. Paragraphs
can be on one line (or many), and can drone on for hours.

### Links

Here is a Markdown link to [Apache CouchDB](http://couchdb.apache.org),
and a literal &lt;http://link.com/&gt;.

Expand All @@ -21,6 +23,10 @@ <h3>Markdown basics:</h3>

Here's a link to [the wiki home page](index).

You can also create links with CamelCase or with [[double-bracket-links]]

### Emphasis

Now some inline markup like _italics_, **bold**, and `code()`.

### Images are easy
Expand Down
2 changes: 1 addition & 1 deletion lib/wiki.js
Expand Up @@ -2,7 +2,7 @@ var markdown = require("vendor/couchapp/lib/markdown");

function wikilinks(text) {
return text.replace(/\[\[(.*)\]\]/g,"[$1]($1)").
replace(/(^|\W)([A-Z]\w*[A-Z]\w*)(\W|$)/gm,"$1[$2]($2)");
replace(/(^|\s)([A-Z][a-z]\w*[A-Z][a-z]\w*)(\s|$)/gm,"$1[$2]($2)$3");
};

exports.encode = function(text) {
Expand Down

0 comments on commit a55524e

Please sign in to comment.