Skip to content

Commit

Permalink
Update page.js (#26622)
Browse files Browse the repository at this point in the history
  • Loading branch information
ycw committed Aug 22, 2023
1 parent 288d411 commit 7a3cb2e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ function onDocumentLoad() {
text = text.replace( /\[link:([\w\:\/\.\-\_\(\)\?\#\=\!\~]+)\]/gi, '<a href="$1" target="_blank">$1</a>' ); // [link:url]
text = text.replace( /\[link:([\w:/.\-_()?#=!~]+) ([\w\p{L}:/.\-_'\s]+)\]/giu, '<a href="$1" target="_blank">$2</a>' ); // [link:url title]
text = text.replace( /\*([\u4e00-\u9fa5\w\d\-\(\"\(\“][\u4e00-\u9fa5\w\d\ \/\+\-\(\)\=\,\.\(\)\,\。"]*[\u4e00-\u9fa5\w\d\"\)\”\)]|\w)\*/gi, '<strong>$1</strong>' ); // *text*
text = text.replace( /\`(.*?)\`/gi, '<code class="inline">$1</code>' ); // `code`
text = text.replace( /\`(.*?)\`/gs, '<code class="inline">$1</code>' ); // `code`

text = text.replace( /\[example:([\w\_]+)\]/gi, '[example:$1 $1]' ); // [example:name] to [example:name title]
text = text.replace( /\[example:([\w\_]+) ([\w\:\/\.\-\_ \s]+)\]/gi, '<a href="../examples/#$1" target="_blank">$2</a>' ); // [example:name title]
Expand Down

0 comments on commit 7a3cb2e

Please sign in to comment.