Skip to content

Commit

Permalink
skip: update regex pattern for demo
Browse files Browse the repository at this point in the history
To handle '\n' to be displayed properly in source code
  • Loading branch information
Travis CI committed Jan 16, 2019
1 parent ad918f9 commit ca53f35
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion demo/chart.js
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ var billboardDemo = {

if (/multiline/i.test(key)) {
codeStr = codeStr.replace(/\\n(?=(\t|\s+))/g, "")
.replace(/\\n(?=[a-zA-Z0-9])/g, "n");
.replace(/\\\\n(?=[a-zA-Z0-9])/g, "\\n");
} else {
codeStr = codeStr.replace(/\\n(?!T)/g, "\n")
.replace(/\\(u)/g, "\$1");
Expand Down

0 comments on commit ca53f35

Please sign in to comment.