minor changes

This commit is contained in:
Andrew Pareles 2025-01-23 02:55:27 -08:00
parent e06eda1cc4
commit 58f06d3ebb

View file

@ -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 ```