Skip to content

Make empty text nodes generate newline#97

Merged
s-ludwig merged 4 commits intorejectedsoftware:masterfrom
ahmetsait:master
Jan 8, 2025
Merged

Make empty text nodes generate newline#97
s-ludwig merged 4 commits intorejectedsoftware:masterfrom
ahmetsait:master

Conversation

@ahmetsait
Copy link
Contributor

A little bit of band aid fix for being unable to use empty text nodes | to introduce spacing.

@schveiguy
Copy link
Contributor

schveiguy commented Jan 1, 2025

  1. dscanner.ini should not be part of this, make it a separate PR.
  2. I'm not familiar too much with the parser, but I don't see how this adds newlines for | nodes?
  3. Needs a test.

@ahmetsait
Copy link
Contributor Author

Hopefully @s-ludwig can find some time to review this. Currently it is rather hard to introduce spacing in diet.

Copy link
Member

@s-ludwig s-ludwig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense to go this way. The fact that pug.js has moved to always removing whitespace leaves the question whether there is a good way of following that, or if we simply have to stay on course with the explicit whitespace removal. In any case, this change isn't going to hurt, since pug.js does the same thing with empty pipe text.

@s-ludwig s-ludwig enabled auto-merge January 8, 2025 08:15
@s-ludwig s-ludwig merged commit 3cea222 into rejectedsoftware:master Jan 8, 2025
12 checks passed
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.

3 participants