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

fix(parser): quoted text newline handling #624

Merged
merged 1 commit into from
Jun 20, 2020

Conversation

gdamore
Copy link
Collaborator

@gdamore gdamore commented Jun 19, 2020

Quoted texts (such as bold) should span newlines, but should
not be permitted to span paragraphs or blocks. This fixes
all of them, and includes parser and renderer validation.

Fixes #623

Quoted texts (such as bold) should span newlines, but should
not be permitted to span paragraphs or blocks.  This fixes
all of them, and includes parser and renderer validation.

Fixes bytesparadise#623
@codecov
Copy link

codecov bot commented Jun 19, 2020

Codecov Report

Merging #624 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master     #624   +/-   ##
=======================================
  Coverage   86.78%   86.78%           
=======================================
  Files          70       70           
  Lines        4395     4395           
=======================================
  Hits         3814     3814           
  Misses        369      369           
  Partials      212      212           

@gdamore
Copy link
Collaborator Author

gdamore commented Jun 19, 2020

I did not copy and modify the rendering tests for HTML to XHTML in this case. I don't think they add any useful extra value in the XHTML tree, since the parse tree is already validated, and these formats are not different between HTML and XHTML.

Copy link
Member

@xcoulon xcoulon left a comment

Choose a reason for hiding this comment

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

thanks for the fix and the extensive test coverage, @gdamore 🙌

types.QuotedText{
Kind: types.Bold,
Elements: []interface{}{
types.StringElement{Content: "some bold\ncontent"},
Copy link
Member

Choose a reason for hiding this comment

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

now I realize that the line may actually span on multiple lines, but it's not a big deal I guess...

@xcoulon xcoulon merged commit 07252b5 into bytesparadise:master Jun 20, 2020
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.

Monospace quoted text incorrect spans paragraphs
2 participants