Skip to content

Commit ddd4063

Browse files
committed
Trying to come up with a better regular expression for matching emphasis in docs.
Old one was breaking on multiplications in code snippets.
1 parent 07d57df commit ddd4063

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/page.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ var onDocumentLoad = function ( event ) {
1111
text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "<a href=\"javascript:window.parent.goTo('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
1212
text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, "[link:$1 $1]" ); // [link:url] to [link:url title]
1313
text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+) ([\w|\:|\/|\.|\-|\_]+)\]/gi, "<a href=\"$1\" target=\"_blank\">$2</a>" ); // [link:url title]
14-
text = text.replace(/\*([\w|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.\"]+)\*/gi, "<strong>$1</strong>" ); // *
14+
text = text.replace(/\*([\w|\"][\w|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.\"]+[\w|\"]|\w)\*/gi, "<strong>$1</strong>" ); // *
1515

1616
document.body.innerHTML = text;
1717

0 commit comments

Comments
 (0)