Open
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">).
Member
Generated by 🚫 Danger |
aeqz
reviewed
Dec 28, 2022
Contributor
aeqz
left a comment
There was a problem hiding this comment.
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. |
Contributor
There was a problem hiding this comment.
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 👍
aeqz
approved these changes
Dec 29, 2022
Member
|
Part of me wants #276 to be done before merging this PR, but will see. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.