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.
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
Add
reference
field toLinkReference
,ImageReference
#23Add
reference
field toLinkReference
,ImageReference
#23Changes from 2 commits
8453ad9
eedeaca
7825abe
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Would it make sense to drop the case where
referenceType
isfull
? Although it’s not needed to create the original markdown for collapsed or shortcut references in remark, it’s one less condition in the spec?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.
Maybe it could be useful for linting, or non-HTML and non-markdown outputs?
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.
Two thoughts:
I don't know how to trade-off the additional memory usage vs the overhead (conceptual and runtime) of a single if-check.
What I do know is that 50+ tests within the remark repository alone will need to be updated should the check for
full
and different thanidentifier
be dropped. If there is that much change within the repository, chances are high this change will affect somebody's test suite out there.As to usefulness, this comment was not meant to be an exhaustive list. I did provide a patch for remark-stringify, so this new property is arguably useful in the generation of markdown (i.e., not just the consumption).
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.
script/regenerate-fixtures
that updates the ASTs for all tests, and you can check the diff if it works or not. I personally don’t see the addition of a property to nodes as a breaking change. Even if someones tests break because of fixtures, I don’t thinkactual(not sure how to call it) code will break.reference
to non-full references could potentially be useful for other things, like linting, even though we’re now discussing stringifying to markdown and html, which doesn’t need it.