Skip to content

Commit 86faaca

Browse files
committed
Docs: Improved [link:] handling.
1 parent b67a3f7 commit 86faaca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/page.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,8 @@ function onDocumentLoad() {
6969
text = text.replace( /\[(?:member|property|method):([\w]+) ([\w\.\s]+)\]\s*(\(.*\))?/gi, '<a onclick="window.parent.setUrlFragment(\'' + name + '.$2\')" target="_parent" title="' + name + '.$2" class="permalink">#</a> .<a onclick="window.parent.setUrlFragment(\'' + name + '.$2\')" id="$2">$2</a> $3 : <a class="param" onclick="window.parent.setUrlFragment(\'$1\')">$1</a>' );
7070
text = text.replace( /\[param:([\w\.]+) ([\w\.\s]+)\]/gi, '$2 : <a class="param" onclick="window.parent.setUrlFragment(\'$1\')">$1</a>' ); // [param:name title]
7171

72-
text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, '[link:$1 $1]' ); // [link:url] to [link:url title]
73-
text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_|\(|\)|\?|\#|\=|\!]+) ([\w|\:|\/|\.|\-|\_|\s]+)\]/gi, '<a href="$1" target="_blank">$2</a>' ); // [link:url title]
72+
text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_|\(|\)|\?|\#|\=|\!|\~]+)\]/gi, '<a href="$1" target="_blank">$1</a>' ); // [link:url]
73+
text = text.replace( /\[link:([\w|\:|\/|\.|\-|\_|\(|\)|\?|\#|\=|\!|\~]+) ([\w|\:|\/|\.|\-|\_|\'|\s]+)\]/gi, '<a href="$1" target="_blank">$2</a>' ); // [link:url title]
7474
text = text.replace( /\*([\w|\d|\"|\-|\(][\w|\d|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.\"]*[\w|\d|\"|\)]|\w)\*/gi, '<strong>$1</strong>' ); // *
7575

7676
text = text.replace( /\[example:([\w\_]+)\]/gi, '[example:$1 $1]' ); // [example:name] to [example:name title]

0 commit comments

Comments
 (0)