mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
add fix to markdown for "empty" codeblocks
This commit is contained in:
parent
2a6e54f580
commit
6cca320bd7
1 changed files with 1 additions and 0 deletions
|
@ -10,6 +10,7 @@ module.exports.highlight = function(content){
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports.codeblock = function(type, content){
|
module.exports.codeblock = function(type, content){
|
||||||
|
if(!content.length) return "```" + type + "\n```"
|
||||||
return "```" + type + "\n" + content.join('\n').replace(/`/g, '`') + "\n```"
|
return "```" + type + "\n" + content.join('\n').replace(/`/g, '`') + "\n```"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue