-
-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
Support <kbd> in HTML #5796
Comments
* Text.Pandoc.Shared: export `htmlSpanLikeElements` [API change] This commit also introduces a mapping of HTML span like elements that are internally represented as a Span with a single class, but that are converted back to the original element by the html writer. As of now, only the kbd element is handled this way. Ideally these elements should be handled as plain AST values, but since that would be a breaking change with a large impact, we revert to this stop-gap solution. Fixes #5796.
While switching to Pandoc 2.8.x I've noticed that echo "This is my [key]{.kbd} example" | pandoc --from=markdown --to=markdown-raw_attribute-inline_code_attributes outputs
while echo "This is my <kbd>key</kbd> example" | pandoc --from=markdown --to=markdown-raw_attribute-inline_code_attributes outputs
I think it would be awesome if the former command would produce the same output as the latter since
Currently inline code attributes seem like a one-way road to me... |
Yes, but raw HTML is just passed through as raw HTML; it isn't parsed. (That's by design.) |
Well, since Pandoc 2.8, echo "This is my <kbd>key</kbd> example" | pandoc --from=markdown --to=markdown yields:
|
That is just a pandoc-markdown syntax for explicitly marking up raw text in some format.
|
OK, I got that. But somehow I still feel that echo "This is my [key]{.kbd} example" | pandoc --from=markdown --to=markdown-inline_code_attributes should then yield
instead of
(as I tried to explain in my first post) Anyway, feel free to ignore this and focus on more important stuff 😄 |
See https://developer.mozilla.org/en-US/docs/Web/HTML/Element/kbd
would better be parsed as a Span with a special class
kbd
.The writer should be sensitive to this as well, rendering such spans using
<kbd>
.The text was updated successfully, but these errors were encountered: