mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
minor changes
This commit is contained in:
parent
e06eda1cc4
commit
58f06d3ebb
1 changed files with 5 additions and 1 deletions
|
|
@ -86,7 +86,11 @@ class SurroundingsRemover {
|
|||
|
||||
pm.removeFromStartUntil('\n', true) // language
|
||||
|
||||
const foundCodeBlockEnd = pm.removeSuffix('```') || pm.removeSuffix('```\n')
|
||||
const j = pm.j
|
||||
let foundCodeBlockEnd = pm.removeSuffix('```')
|
||||
|
||||
if (pm.j === j) foundCodeBlockEnd = pm.removeSuffix('```\n') // if no change, try again with \n after ```
|
||||
|
||||
if (!foundCodeBlockEnd) return false
|
||||
|
||||
pm.removeSuffix('\n') // remove the newline before ```
|
||||
|
|
|
|||
Loading…
Reference in a new issue