зеркало из https://github.com/nextcloud/text.git
fix: Ignore plaintext language in mardown
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Родитель
c40cf226aa
Коммит
d2c287b42a
|
@ -38,7 +38,8 @@ const CodeBlock = TiptapCodeBlockLowlight.extend({
|
|||
const backticks = node.textContent.match(/`{3,}/gm)
|
||||
const fence = backticks ? (backticks.sort().slice(-1)[0] + '`') : '```'
|
||||
|
||||
state.write(fence + (node.attrs.params || '') + '\n')
|
||||
const language = node.attrs.params !== 'plaintext' ? node.attrs.params : ''
|
||||
state.write(fence + (language || '') + '\n')
|
||||
state.text(node.textContent, false)
|
||||
// Add a newline to the current content before adding closing marker
|
||||
state.ensureNewLine()
|
||||
|
|
Загрузка…
Ссылка в новой задаче