swiftlang/swift-markdown

inline HTMLBlock Content not supported?

LiYanan2004 opened this issue · 3 comments

I can only get the text of the HTML Tag, but not the content. Is this a bug?

截屏2022-08-13 18 34 44

Sorry, I don't quite understand your problem here.

Could you provide more infomation?
eg. your string/source input, minimal code snippest to reproduce your problem, expected output and actual output.

Looks like we can both get the tag(eg. "kbd") and the content(eg. "Ctrl").

Maybe it's my misunderstanding of this inline block. What I expected is like below:

Document
└ Paragraph
├─ InlineHTML "<kbd>Ctrl</kbd>"
├─ Text "+"
├─ InlineHTML "<kbd>Alt</kbd>"
├─ Text "+"
├─ InlineHTML "<kbd>Del</kbd>"

CommonMark (and GitHub-Flavored Markdown, which we use a fork of) doesn't include tag contents as part of an Inline HTML span, just the tag or closing tag: https://github.github.com/gfm/#raw-html