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

code blocks not correctly render badly in roff format since v0.9.0 #57

Closed
boutil opened this issue Jul 28, 2020 · 3 comments · Fixed by #53
Closed

code blocks not correctly render badly in roff format since v0.9.0 #57

boutil opened this issue Jul 28, 2020 · 3 comments · Fixed by #53
Assignees
Labels
bug Something isn't working
Milestone

Comments

@boutil
Copy link

boutil commented Jul 28, 2020

No description provided.

@boutil
Copy link
Author

boutil commented Jul 28, 2020

Starting from version 0.9.0, the output of bin/ronn on test/code_blocks.7.ronn is not correct.
Until v0.8.2, it rendered correctly like this:

.\" generated with Ronn-NG/v0.8.2
.\" http://github.com/apjanke/ronn-ng/tree/0.8.2
.TH "CODE_BLOCKS" "7" "July 2020" "" ""
.SH "Basic code block"
.nf
Hello, world!
.fi
.SH "Language\-identified code blocks"
.nf
<html>
  <head>
    <title>Hello, world!</title>
  </head>
  <body>
    Hello, world!
  </body>
</html>
.fi
.SH "Interspersed code blocks and text"
Some text\.
.IP "" 4
.nf
Some code\.
.fi
.IP "" 0
.P
Here\'s some <pre> text\.
.IP "" 4
.nf
    This is pre text\.
.fi
.IP "" 0
.P
Some more text\.
.IP "" 4
.nf
Some more code\.
.fi
.IP "" 0

but since v0.9.0, it gives:

.\" generated with Ronn-NG/v0.9.0
.\" http://github.com/apjanke/ronn-ng/tree/0.9.0
.TH "CODE_BLOCKS" "7" "July 2020" ""
.SH "Basic code block"
\fBHello, world!\fR
.SH "Language\-identified code blocks"
```htmlHello, world!
.P
```    
.SH "Interspersed code blocks and text"
Some text\.
.P
\fBSome code\.\fR
.P
Here\'s some <pre> text\.
.IP "" 4
.nf
    This is pre text\.
.fi
.IP "" 0
.P
Some more text\.
.P
\fBSome more code\.\fR

This is the same output with 0.9.1.
This has been reported on Debian, https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=964322, and I have been able to reproduce it from a git checkout.

It seems that this file is not used in the test suite, as it does not come with a companion .html or .roff file for comparison.

@boutil boutil changed the title code blocks correctly render badly in roff format since v0.9.0 code blocks not correctly render badly in roff format since v0.9.0 Jul 28, 2020
@apjanke apjanke self-assigned this Jul 28, 2020
@apjanke apjanke added the bug Something isn't working label Jul 28, 2020
@apjanke
Copy link
Owner

apjanke commented Jul 28, 2020

Thanks for the bug report! I can reproduce.

It looks like this was caused by the switch to the Kramdown backend: fenced code blocks are technically an extension to Markdown, not in the vanilla spec, and Kramdown, unlike our previous parser, does not enable them by default.

There's already a PR open to fix this: #53. Would you mind giving that a test and see if it resolves your issue? (It also fixes the problem of the fenced-code-block file in the test suite not actually being checked.)

@boutil
Copy link
Author

boutil commented Jul 29, 2020

I confirm that the code in the gfm branch is producing the correct output for code blocks, at least on the example mentionned above.

@apjanke apjanke modified the milestones: 0.10.0, 0.10.1 Dec 31, 2022
@apjanke apjanke added this to ronn-ng Jan 4, 2024
@apjanke apjanke moved this to Closed 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
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants