Skip to content
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 property on full references when different from identif… #346

Closed
wants to merge 2 commits into from

Conversation

rubys
Copy link
Contributor

@rubys rubys commented Aug 8, 2018

…ier.

  • Change parse to add this property when needed to reconstruct the original
    input should the reference turn out to be undefined.
  • Change parse test to handle this case
  • Change stringify to prefer the reference property, if present, over
    the identifier property to produce markdown source.
  • Add round-tripping tests for all undefined references.

…ier.

* Change parse to add this property when needed to reconstruct the original
  input should the reference turn out to be undefined.
* Change parse test to handle this case
* Change stringify to prefer the reference property, if present, over
  the identifier property to produce markdown source.
* Add round-tripping tests for all undefined references.
['capitalized image references - full', '![alpha][Bravo]'],
['capitalized image references - collapsed', '![Bravo][]'],
['capitalized image references - shortcut', '![Bravo]'],
['capitalized footnote references', '[^Alpha]'],

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the linter complains about the trailing comma.

@codecov-io

This comment has been minimized.

wooorm added a commit to syntax-tree/mdast that referenced this pull request Aug 31, 2018
This change adds support for a new optional field on the association
mixin, used by `definition`, `footnoteDefinition`, the `Reference`
mixin (in turn used by `linkReference`, `imageReference`, and
`footnoteReference`).

The value of the `label` field must, when present, hold the
non-normalised value of the `identifier` field.

This allows references that are not association with definitions
to be represented correctly as raw text again.

Closes GH-23.
Related to syntax-tree/mdast-util-to-hast#20
Related to syntax-tree/mdast-util-to-hast#21
Related to syntax-tree/mdast-util-to-hast#22
Related to remarkjs/remark#346
@BridgeAR
Copy link

BridgeAR commented Sep 5, 2018

Ping @wooorm

@wooorm
Copy link
Member

wooorm commented Oct 6, 2018

Superseded by GH-363, which takes this PR but uses a different name in accordance with mdast and adds labels to all associations.

@wooorm wooorm closed this Oct 6, 2018
wooorm added a commit that referenced this pull request Oct 14, 2018
* remark-parse: add label to definition, footnote definition, link reference, image reference,
  footnote reference
* remark-stringify: use full reference if no type is set

Related to syntax-tree/mdast#23.
Related to syntax-tree/mdast-util-to-hast#22.

Supersedes GH-346.

Closes GH-363.

Reviewed-by: Christian Murphy <christian.murphy.42@gmail.com>

Co-authored-by: Sam Ruby <rubys@intertwingly.net>
wooorm added a commit to syntax-tree/mdast-util-to-hast that referenced this pull request Nov 11, 2018
Closes GH-22.
Related to GH-20.
Related to syntax-tree/mdast#23.
Related to remarkjs/remark#346.

Co-authored-by: Sam Ruby <rubys@intertwingly.net>
wooorm added a commit to syntax-tree/mdast-util-to-hast that referenced this pull request Nov 11, 2018
Closes GH-22.
Related to GH-20.
Related to syntax-tree/mdast#23.
Related to remarkjs/remark#346.

Co-authored-by: Sam Ruby <rubys@intertwingly.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants