Skip to content

Commit

Permalink
fix: Fix comments in lists falsely being considered corrupted #126
Browse files Browse the repository at this point in the history
  • Loading branch information
BlayTheNinth committed Feb 22, 2025
1 parent a33604f commit 3cf21a1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,11 @@ void next(NotomlStateMachine state, NotomlParseBuffer buffer, NotomlTokenConsume
@Override
void next(NotomlStateMachine state, NotomlParseBuffer buffer, NotomlTokenConsumer consumer) {
buffer.consumeWhitespace();
if (buffer.next("\"", "'")) {
if (buffer.nextConsume("#")) {
String value = buffer.readUntil("\n", "\r\n", "\r").trim();
consumer.emitComment(value);
state.transition(List);
} else if (buffer.next("\"", "'")) {
String value = buffer.readQuoted();
consumer.emitPropertyValue(value);
state.transition(List);
Expand Down

0 comments on commit 3cf21a1

Please sign in to comment.