Skip to content

Commit

Permalink
Prevent auto-linking in code spans
Browse files Browse the repository at this point in the history
  • Loading branch information
balpha committed Oct 22, 2011
1 parent f08405f commit 0df443b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Markdown.Converter.js
Original file line number Diff line number Diff line change
Expand Up @@ -1004,6 +1004,7 @@ else
c = c.replace(/^([ \t]*)/g, ""); // leading whitespace
c = c.replace(/[ \t]*$/g, ""); // trailing whitespace
c = _EncodeCode(c);
c = c.replace(/:\/\//g, "~P"); // to prevent auto-linking. Not necessary in code *blocks*, but in code spans. Will be converted back after the auto-linker runs.
return m1 + "<code>" + c + "</code>";
}
);
Expand Down

0 comments on commit 0df443b

Please sign in to comment.