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

Don’t break right after an HTML code tag that’s followed by a literal #638

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

now
Copy link
Contributor

@now now commented Aug 1, 2021

If a CODE_OPEN_TAG token is followed by a LITERAL token, break before writing the CODE_OPEN_TAG token if writing it will result in us eating up the remainder of the current line.

Partially fixes #84.

I’m not super happy about the breakBeforeIfAtEndOfLine name, but that’s the best I could come up with right now. I also wish there was a cleaner way of peeking at the next token.

If a CODE_OPEN_TAG token is followed by a LITERAL token, break before writing
the CODE_OPEN_TAG token if writing it will result in us eating up the remainder
of the current line.

Partially fixes google#84.
@google-cla google-cla bot added the cla: yes label Aug 1, 2021
@now now changed the title Don’t break right after a HTML code tag that’s followed by a literal Don’t break right after an HTML code tag that’s followed by a literal Aug 1, 2021
@now
Copy link
Contributor Author

now commented Aug 27, 2021

Could someone please have a look at this? Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't introduce line break at beginning of <code>
1 participant