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

Blockquote/pre emit spurious empty paragraph #70

Open
paravoid opened this issue Jan 1, 2021 · 1 comment
Open

Blockquote/pre emit spurious empty paragraph #70

paravoid opened this issue Jan 1, 2021 · 1 comment
Assignees
Labels
bug Something isn't working
Milestone

Comments

@paravoid
Copy link

paravoid commented Jan 1, 2021

The code currently reads:

when 'blockquote'
  []
  macro 'IP', %w["" 4] if indent
  []
  macro 'IP', %w["" 0] if indent

when 'pre'
  []
  macro 'IP', %w["" 4] if indent
  []
  macro 'IP', %w["" 0] if indent

This results into e.g. code blocks ending with an .IP "" 0, i.e. the opening of a new paragraph, which is left subsequently empty (also: .IP "" 0 is also equivalent to .P, I believe?). In the following excerpt of the test/code_blocks.roff output, one can see that there is the .IP, followed by another .P, meaning that there is an empty paragraph between the two code blocks:

[…]
Some text\.
.IP "" 4
.nf
Some code\.
.fi
.IP "" 0
.P
Here's some <pre> text\.
[…]

Finally, it seems that commit f528c25 tried to address the output by using more's -s, to strip the extra vertical whitespace. But, I wonder if instead ronn could just not emit those empty paragraphs?

@apjanke apjanke self-assigned this Jan 6, 2021
@apjanke apjanke added the bug Something isn't working label Jan 6, 2021
@apjanke apjanke added this to the 0.11.0 milestone Jan 6, 2021
@apjanke
Copy link
Owner

apjanke commented Jan 6, 2021

I agree with you here. Thanks for doing the analysis. Scheduling this for fix in 0.11 or before. I'm going to have to do some reading on how exactly .IP and .P work.

@apjanke apjanke added this to ronn-ng Jan 4, 2024
@apjanke apjanke moved this to Low priority in ronn-ng Jan 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Low priority
Development

No branches or pull requests

2 participants