インラインのコードでもシンタックスハイライトを有効化

This commit is contained in:
syuilo
2017-02-12 02:38:47 +09:00
parent 7791dd5471
commit e19899962e
5 changed files with 382 additions and 378 deletions

View File

@ -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('');