-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix dropping newlines, breaking some code blocks (#450)
Turns out that codeblocks, while usually being formatted as one text event containing all the lines, sometimes have multiple text events, each ending with a newline. When removing those newlines, they are (a) missing in the output, and (b) pulldown-cmark-to-cmark chokes on the indent of the end of codeblock (Byron/pulldown-cmark-to-cmark#69). Fixes #440
- Loading branch information
Showing
6 changed files
with
45 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
[package] | ||
name = "code_block_in_list" | ||
version = "0.0.0" | ||
publish = false | ||
edition = "2021" | ||
|
||
[lib] | ||
path = "lib.rs" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{{readme}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
This is an example testing code blocks in lists | ||
|
||
* in the past, this has caused issues | ||
|
||
* one of such cases was [\#440][__link0] | ||
|
||
* therefore, we have this example/test: | ||
|
||
```rust | ||
struct Foo { | ||
bar: usize | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
//! This is an example testing code blocks in lists | ||
//! | ||
//! - in the past, this has caused issues | ||
//! - one of such cases was [#440](https://github.com/msrd0/cargo-doc2readme/issues/440) | ||
//! - therefore, we have this example/test: | ||
//! | ||
//! ```rust | ||
//! # #[derive(Clone, Copy)] | ||
//! struct Foo { | ||
//! bar: usize | ||
//! } | ||
//! ``` |