mirror of
https://github.com/Hopiu/angular.js.git
synced 2026-05-24 05:43:43 +00:00
docs linkifying regexp should not mess up links alreaded converete by markdown
This commit is contained in:
parent
a6978b201b
commit
4491bbdede
1 changed files with 1 additions and 1 deletions
|
|
@ -169,7 +169,7 @@ function markdown(text) {
|
||||||
if (!text.match(/^<pre>/)) {
|
if (!text.match(/^<pre>/)) {
|
||||||
text = text.replace(/<angular\/>/gm, '<tt><angular/></tt>');
|
text = text.replace(/<angular\/>/gm, '<tt><angular/></tt>');
|
||||||
text = new Showdown.converter().makeHtml(text);
|
text = new Showdown.converter().makeHtml(text);
|
||||||
text = text.replace(/(angular\.[\$\w\._\-:]+)/gm, '<a href="#!$1">$1</a>');
|
text = text.replace(/[^#][^!](angular\.[\$\w\._\-:]+)/gm, '<a href="#!$1">$1</a>');
|
||||||
text = text.replace(/(`(ng:[\w\._\-]+)`)/gm, '<a href="#!angular.directive.$2">$1</a>');
|
text = text.replace(/(`(ng:[\w\._\-]+)`)/gm, '<a href="#!angular.directive.$2">$1</a>');
|
||||||
parts[i] = text;
|
parts[i] = text;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue