Skip to content

Commit 2396827

Browse files
committed
feat(isc): handle notes: [] empty list form
1 parent c3b7cac commit 2396827

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

exe/codemod-imp-to-isc

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,11 @@ module Interscript
253253
break
254254
end
255255
end
256-
elsif @scanner.scan(/(?:\A|\n)([ \t]+)notes[ \t]*:[ \t]*"/)
256+
elsif @scanner.scan(/(?:\A|\n)([ \t]+)notes[ \t]*:[ \t]*\[\]/)
257+
# `notes: []` — empty notes list
258+
indent = @scanner[1]
259+
@out << "\n#{indent}notes { }"
260+
elsif @scanner.scan(/(?:\A|\n)([ \t]+)notes[ \t]*:[ \t]*"[ \t]*\n/)
257261
# `notes: "X"` — single quoted-string note value
258262
indent = @scanner[1]
259263
@out << "\n#{indent}notes {\n#{indent} note \""

0 commit comments

Comments
 (0)