Skip to content

Commit d2b1ac6

Browse files
committed
fix(isc): strip both trailing " and ' from multi-line YAML notes
Result: 276/289 deep equivalent
1 parent 8bada43 commit d2b1ac6

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/interscript/isc/document_builder.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,14 +149,13 @@ def extract_metadata(arr)
149149
Array(field[:notes]).each do |n|
150150
note_val = n.is_a?(Hash) ? n[:note] : n
151151
note_text = normalize_heredoc(unquote(note_val).to_s)
152-
note_text = note_text.sub(/"\z/, "")
152+
note_text = note_text.sub(/["']\z/, "")
153153
h[:notes] << note_text
154154
end
155155
when field.key?(:note)
156156
h[:notes] ||= []
157157
note_text = normalize_heredoc(unquote(field[:note]).to_s)
158-
# Strip trailing " leaked from multi-line YAML quoted items
159-
note_text = note_text.sub(/"\z/, "")
158+
note_text = note_text.sub(/["']\z/, "")
160159
h[:notes] << note_text
161160
when field.key?(:provenance)
162161
h[:provenance] ||= []

0 commit comments

Comments
 (0)