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

Expose cmark_node_parent_footnote_def. #254

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

ioquatix
Copy link

@phillmv in ioquatix@1717040 you introduced a better internal representation for footnotes.

I maintain a fork/interface for Ruby.

We cannot generate the same footnotes as the internal HTML renderer because the public interface doesn't expose all the required details.

This is an attempt to start a discussion around what that interface should look like.

  • There are no tests - should we add some?
  • The interface cmark_node_parent_footnote_def seems clunky - what is _def and should this really be part of the name?

Copy link
Member

@phillmv phillmv left a comment

Choose a reason for hiding this comment

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

This seems fine to me!

src/cmark-gfm.h Outdated Show resolved Hide resolved
@ioquatix
Copy link
Author

ioquatix commented Jan 27, 2023

Awesome, look forward to getting this merged!

Should we rename cmark_node_parent_footnote_def to cmark_node_parent_footnote?

Co-authored-by: Waldir Pimenta <waldyrious@gmail.com>
@phillmv
Copy link
Member

phillmv commented Jan 31, 2023

what is _def and should this really be part of the name?
Should we rename cmark_node_parent_footnote_def to cmark_node_parent_footnote?

def refers to CMARK_NODE_FOOTNOTE_DEFINITION and IIRC it's used to denote the, well, definition of the footnote, i.e.

[^footnote-def]: this is a definition

in contrast to CMARK_NODE_FOOTNOTE_REFERENCE, which a reference to a footnote, i.e.

lorem ipsum[^footnote-def].

It's consistently in the codebase and I don't really see a compelling reason to rename.

Cheers,

@phillmv phillmv merged commit 7b4ed79 into github:master Jan 31, 2023
@ioquatix ioquatix deleted the expose-cmark_node_parent_footnote_def branch January 31, 2023 20:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants