インラインのコードでもシンタックスハイライトを有効化
This commit is contained in:
parent
7791dd5471
commit
e19899962e
5 changed files with 382 additions and 378 deletions
|
|
@ -31,9 +31,9 @@ module.exports = function(tokens, shouldBreak, shouldEscape) {
|
|||
case 'hashtag': // TODO
|
||||
return '<a>' + escape(token.content) + '</a>';
|
||||
case 'code':
|
||||
return '<pre><code>' + token.codeHtml + '</code></pre>';
|
||||
return '<pre><code>' + token.html + '</code></pre>';
|
||||
case 'inline-code':
|
||||
return '<code>' + escape(token.code) + '</code>';
|
||||
return '<code>' + token.html + '</code>';
|
||||
}
|
||||
}).join('');
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue