Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid skipping extra whitespace in wikiparser.js #7835

Merged
merged 1 commit into from Nov 14, 2023

Conversation

rmunn
Copy link
Contributor

@rmunn rmunn commented Nov 14, 2023

When wikiparser.js parses text looking for a pragma block, it skips whitespace before looking for the next pragma. If no pragma is found, we should return the parse position to the original location so that the skipped whitespace can be parsed as a text node. This allows the attribute join=" and " to parse as " and " (leading and trailing whitespace intact) rather than "and " (where the leading whitespace was skipped).

When wikiparser parses text looking for a pragma block, it skips
whitespace before looking for the next pragma. If no pragma is found,
we should return the parse position to the original location so that the
skipped whitespace can be parsed as a text node. This allows the
attribute `join=" and "` to parse as " and " rather than "and ".
Copy link

vercel bot commented Nov 14, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
tiddlywiki5 ✅ Ready (Inspect) Visit Preview Nov 14, 2023 3:56am

@Jermolene
Copy link
Owner

Great, thanks @rmunn

@Jermolene Jermolene merged commit 215bd4e into Jermolene:master Nov 14, 2023
4 checks passed
Jermolene added a commit that referenced this pull request Dec 17, 2023
This is intended to revert some of the behaviour introduced in #7835, see the discussion here: #7888 (comment)
Jermolene added a commit that referenced this pull request Dec 21, 2023
This is intended to revert some of the behaviour introduced in #7835, see the discussion here: #7888 (comment)
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
When wikiparser parses text looking for a pragma block, it skips
whitespace before looking for the next pragma. If no pragma is found,
we should return the parse position to the original location so that the
skipped whitespace can be parsed as a text node. This allows the
attribute `join=" and "` to parse as " and " rather than "and ".
munnox pushed a commit to munnox/TiddlyWiki5 that referenced this pull request Dec 24, 2023
This is intended to revert some of the behaviour introduced in Jermolene#7835, see the discussion here: Jermolene#7888 (comment)
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.

None yet

2 participants