Skip to content

fix: Keep newline-separated comments separate at document start - #732

Open
dualfroz wants to merge 1 commit into
eemeli:mainfrom
dualfroz:fix/600-document-start-comments
Open

dualfroz wants to merge 1 commit into
eemeli:mainfrom
dualfroz:fix/600-document-start-comments

Conversation

@dualfroz

Copy link
Copy Markdown

Issue

fixes #600

LLM Use

an LLM reviewed my code, i didn't apply any of its suggestions

Description

parsePrelude() now also returns where the last empty line between comments was. when the prelude doesn't end with an empty line, the part before that point goes to doc.commentBefore and the rest to the value, so #foo\n\n#bar\n42 gives 'foo' on the document and 'bar' on the value. stringified output doesn't change.

seq comments without # expected the combined ' c1\n\n c2' on the first item, updated it to ' c1' on the document and ' c2' on the item.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Newline-separated comments should stay separate at document start

1 participant