Skip to content

Commit

Permalink
JSON preview now supports new tools (#430)
Browse files Browse the repository at this point in the history
  • Loading branch information
neSpecc committed Aug 21, 2018
1 parent d9a2361 commit 8ee951c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion example/assets/json-preview.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const cPreview = (function (module) {
/** Stylize JSON keys */
string = string.replace( /"(\w+)"\s?:/g, '"<span class=sc_key>$1</span>" :');
/** Stylize tool names */
string = string.replace( /"(text|quote|list|header|link|code|image|delimiter)"/g, '"<span class=sc_toolname>$1</span>"');
string = string.replace( /"(paragraph|quote|list|header|link|code|image|delimiter|raw)"/g, '"<span class=sc_toolname>$1</span>"');
/** Stylize HTML tags */
string = string.replace( /(&lt;[\/a-z]+(&gt;)?)/gi, '<span class=sc_tag>$1</span>' );
/** Stylize strings */
Expand Down

0 comments on commit 8ee951c

Please sign in to comment.