diff options
author | Wu Cheng-Han | 2016-10-14 17:35:35 +0800 |
---|---|---|
committer | Wu Cheng-Han | 2016-10-14 17:35:35 +0800 |
commit | 211d25253ec6f5a067affae77308007224b5f33d (patch) | |
tree | ccd451028520af129935af16b5a3ef9feb28e4c9 /public/js/syncscroll.js | |
parent | f93e8f5fdcec43b2a56146a436b50b4a8c8480da (diff) |
Update to support wrap syntax for code block
Diffstat (limited to '')
-rw-r--r-- | public/js/syncscroll.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/public/js/syncscroll.js b/public/js/syncscroll.js index 626c790f..c2de2d0d 100644 --- a/public/js/syncscroll.js +++ b/public/js/syncscroll.js @@ -61,7 +61,8 @@ md.renderer.rules.fence = function (tokens, idx, options, env, self) { if (info) { langName = info.split(/\s+/g)[0]; - token.attrJoin('class', options.langPrefix + langName.replace(/\=$|\=\d+$|\=\+$/, '')); + if (/\!$/.test(info)) token.attrJoin('class', 'wrap'); + token.attrJoin('class', options.langPrefix + langName.replace(/\=$|\=\d+$|\=\+$|\!$|\=\!/, '')); token.attrJoin('class', 'hljs'); } |