提交 329a3f80 编写于 作者: M Mr.doob

Docs: Added support for *bold* syntax.

上级 175fd11e
......@@ -350,8 +350,9 @@
text = text.replace(/\[name\]/gi, name);
text = text.replace(/\[path\]/gi, path);
text = text.replace(/\[page:(\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$1</a>" );
text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$2</a>" );
text = text.replace(/\[page:(\w+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$1</a>" ); // [page:name]
text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "<a href=\"javascript:goTo('$1')\" title=\"$1\">$2</a>" ); // [page:name title]
text = text.replace(/\*([\w|\ |\-|\/]+)\*/gi, "<strong>$1</strong>" ); // *
viewer.innerHTML = '<br>' + text + '<br><br>';
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册