-
Notifications
You must be signed in to change notification settings - Fork 3
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
[#93] Add support for basic html tags #259
base: master
Are you sure you want to change the base?
Conversation
Problem: HTML tags can be used in a markdown file. We should add support for basic HTML tags embedded in markdown file. Solution: Add support for image tags (<img src="link">), anchor hyperlinks (<a href="link">Text</a>) and anchor target locations (<a name="loc"> or <a id="loc">).
Generated by 🚫 Danger |
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.
Nice! I have left just some optional style comments and a suggestion for the test.
-- The `cmark-gfm` package parses the link tag as three separate nodes: | ||
-- `HTML_INLINE` with an opening tag, a `TEXT` with text in between, | ||
-- and `HTML_INLINE` with a closing tag. So we keep the extracted link in a state and | ||
-- try to get associated text in the next node. |
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.
As we have been discussing in recent PRs, this code seems to be more difficult to understand with each new feature that requires to modify it. At least, comments and separating chunks of code to functions help in clarifying it for the moment 👍
Part of me wants #276 to be done before merging this PR, but will see. |
Description
Problem: HTML tags can be used in a markdown file. We should add support for basic HTML tags embedded in markdown file.
Solution: Add support for image tags
<img src="link">
, anchor hyperlinks<a href="link">Text</a>
and anchor target locations<a name="loc">
or<a id="loc">
.Related issue(s)
Fixes #93
✅ Checklist for your Pull Request
Ideally a PR has all of the checkmarks set.
If something in this list is irrelevant to your PR, you should still set this
checkmark indicating that you are sure it is dealt with (be that by irrelevance).
Related changes (conditional)
Tests
silently reappearing again.
Documentation
Public contracts
of Public Contracts policy.
and
Stylistic guide (mandatory)
✓ Release Checklist
package.yaml
.under the "Unreleased" section to a new section for this release version.
vX.Y.Z
.xrefcheck-action
.