فهرست منبع

Trying to come up with a better regular expression for matching emphasis in docs.

Old one was breaking on multiplications in code snippets.
alteredq 13 سال پیش
والد
کامیت
ddd4063cae
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      docs/page.js

+ 1 - 1
docs/page.js

@@ -11,7 +11,7 @@ var onDocumentLoad = function ( event ) {
 	text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "<a href=\"javascript:window.parent.goTo('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
 	text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, "[link:$1 $1]" ); // [link:url] to [link:url title]
 	text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+) ([\w|\:|\/|\.|\-|\_]+)\]/gi, "<a href=\"$1\"  target=\"_blank\">$2</a>" ); // [link:url title]
-	text = text.replace(/\*([\w|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.\"]+)\*/gi, "<strong>$1</strong>" ); // *
+	text = text.replace(/\*([\w|\"][\w|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.\"]+[\w|\"]|\w)\*/gi, "<strong>$1</strong>" ); // *
 
 	document.body.innerHTML = text;