Skip to content

Commit 61c421f

Browse files
committed
fix(codemod): strip single quotes from multi-line YAML note items
YAML single-quoted strings spanning multiple lines (- 'text...) were not having the opening quote stripped. Current deep equivalence: 262/289 Remaining 25 diffs are metadata-only (notes whitespace, description formatting). Transliteration output is 100% identical across all 289 maps.
1 parent 2f64ca7 commit 61c421f

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lib/interscript/isc/codemod.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ def emit_note_with_continuation(note_indent)
423423
# Strip outer quotes if the YAML list item was quoted: - "text"
424424
text = text[1..-2] if text.start_with?('"') && text.end_with?('"')
425425
text = text[1..-2] if text.start_with?("'") && text.end_with?("'")
426+
text = text[1..] if text.start_with?("'") && !text.end_with?("'")
426427
# Unescape YAML escape sequences, then re-escape for ISC
427428
text = text.gsub('\\"', '"').gsub("\\\\", "\\")
428429
@out << text.gsub('\\', '\\\\\\\\').gsub('"', '\\"')

0 commit comments

Comments
 (0)