Skip to content

Add HTML attributes#233

Closed
talum wants to merge 1481 commits intofix-footnotes-plus-fix-fnref-label-and-backrefsfrom
add-attributes
Closed

Add HTML attributes#233
talum wants to merge 1481 commits intofix-footnotes-plus-fix-fnref-label-and-backrefsfrom
add-attributes

Conversation

@talum
Copy link

@talum talum commented Aug 31, 2021

In order to support rendering footnotes in markdown on GitHub.com, we'd like to add a few changes to make the markup easier to style.

This PR adds

  • the aria-label for accessibility
  • aria-describedby="footnote-label" for accessibility
  • data-footnotes as another identifier for the <section>
  • data-footnote-ref
  • data-footnote-backref

kivikakk and others added 30 commits September 8, 2017 13:45
blocks: Fix quadratic behavior in `finalize`
For some reason this wasn't getting set in processing
libcmark.pc.in, and we were getting the wrong entry in libcmark.pc.
(See #236)

The new approach sets an internal libdir variable to
lib${LIB_SUFFIX}.  This variable is used both to set the
install destination and in the libcmark.pc.in template.

Closes #236.

However, I'd welcome comments from @juhp who originally
added CMAKE_INSTALL_LIBDIR in #185.  I think that the new
system should work fine with Fedora, since LIB_SUFFIX will
be set appropriately, but some testing is in order.
Due to a mistake, 0.28.1 installed libcmark.a into include/.

Closes #238.
Fixes installation error under some CMake versions, notably kalakris'
CMake backport often used with Travis.
Include GNUInstallDirs in src/CMakeLists.txt
> 32 nested balanced parens in a link is bananas
Tests must complete in 8 seconds or are errors.
This allows us to include tests that we don't yet know
how to pass.
* Shift includes around for proper header install

* msvc fixes
Generate export header for static-only build
* Add baseline test

* Some preliminary work.

* cont'd

* Add footnote reference

* Start postprocessing

* MVP: tests pass

* commonmark footnote out

* Factor out reference/footnote maps

* fix a memory leak & some asserts

* We don't assert/check snprintf elsewhere

* Remove bad linear search, extend test case

* cleanup

* man page update

* add footnotes as option

* bugfix (found in comrak first!)

* Shift static var into renderer struct
@talum talum marked this pull request as ready for review August 31, 2021 15:59
…ade sure to free allocated string in commonmark.c
tldr, avoid freeing memory before passing it along to another function.
Sometimes, when cleaning up unusued footnotes, two footnote->nodes may
end up referencing each other. As they get free()'d up, this can lead to
problems. Instead, first we unlink every node and _then_ free them up.
@talum talum force-pushed the add-attributes branch 5 times, most recently from 813ab1e to 16a9624 Compare September 7, 2021 16:21
Copy link

@brasic brasic left a comment

Choose a reason for hiding this comment

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

LGTM!

phillmv and others added 8 commits September 14, 2021 09:55
Add `aria-label` for accessibility. Add `data-footnotes` as an identifier.
This will describe the footnotes section and improve accessibility. It can be hidden visually.
This reverts commit e4a09ed.

We decided to move this into our own pipeline instead.
@talum talum changed the base branch from master to fix-footnotes-plus-fix-fnref-label-and-backrefs September 14, 2021 15:18
@talum
Copy link
Author

talum commented Sep 14, 2021

I definitely mangled this commit history, so I'm going to close it and retry.

@talum
Copy link
Author

talum commented Sep 14, 2021

Decided to remove the h2 and the aria-describedby. We'll handle those elsewhere.

@phillmv phillmv deleted the add-attributes branch September 16, 2021 20:23
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.