-
Notifications
You must be signed in to change notification settings - Fork 30
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 codeblock in codeblock #129
Conversation
c249c09
to
fdaba81
Compare
Thanks @dalance for finding and fixing this! I believe the correct place to fix this would actually be in pulldown-cmark-to-cmark. I went looking there and Byron/pulldown-cmark-to-cmark#20 looks related. I'm happy to fix this here for now, but we should add a TODO comment with a reference to pulldown-cmark-to-cmark to see if we can fix it for everybody. |
i18n-helpers/src/lib.rs
Outdated
/// Check appropriate codeblock token count | ||
fn check_code_block_token_count(group: &[(usize, Event)]) -> usize { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/// Check appropriate codeblock token count | |
fn check_code_block_token_count(group: &[(usize, Event)]) -> usize { | |
/// Check appropriate codeblock token count | |
/// | |
/// See https://github.com/Byron/pulldown-cmark-to-cmark/issues/20 | |
/// for a related upstream issue. | |
fn check_code_block_token_count(group: &[(usize, Event)]) -> usize { |
@mgeisler Thank you for merging this PR. This is because the problem is a blocking issue of translation on https://github.com/rust-lang/rust-by-example. |
Thanks for reminding me of this! Let me create a release now! |
I've made a 0.3.1 release! 🎉 |
Codeblock which contains
```
will be like below:But the output of mdbook-i18n-helpers seems to be broken like below:
This is because codeblock token count is fixed as 3 in
reconstruct_markdown
.This PR adds to check the appropriate codeblock token count.