You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the CommonMark spec, fenced code block can be nested like below:
`````markdown
````markdown
```typescript
console.log("arikitari na sekai");
```
````
`````
To build markdown from pulldown-cmark's event system like pulldown-cmark-to-cmark, backtick count information is required(In the above example, backtick count is 5). Without the information, we have no choice but to use the hard-coded value.
Hi. Apologies for the delay in responding to this.
You may have figured this out yourself by now, but if you haven't, this may be one way to do it: take the starting byte of the fenced code block and use that as an index into the source text. You can then slice the text starting from that byte and count the number of backticks.
According to the CommonMark spec, fenced code block can be nested like below:
To build markdown from pulldown-cmark's event system like
pulldown-cmark-to-cmark
, backtick count information is required(In the above example, backtick count is 5). Without the information, we have no choice but to use the hard-coded value.However, currently, the
Fenced
event doesn't provide the information.https://docs.rs/pulldown-cmark/0.7.2/pulldown_cmark/enum.CodeBlockKind.html#variant.Fenced
How should I get it?
ref:
The text was updated successfully, but these errors were encountered: