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

update auto_identifier extension to gfm_auto_identifier #403

Open
zkamvar opened this issue Mar 6, 2023 · 0 comments
Open

update auto_identifier extension to gfm_auto_identifier #403

zkamvar opened this issue Mar 6, 2023 · 0 comments
Assignees
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons

Comments

@zkamvar
Copy link
Contributor

zkamvar commented Mar 6, 2023

The following markdown produces an invalid link:

## 1\. introduction

[link to intro](#1-introduction)

It looks like pandoc's auto_identifiers extension strips the leading number from numbered sections (emphasis mine):

The default algorithm used to derive the identifier from the heading text is:

  • Remove all formatting, links, etc.
  • Remove all footnotes.
  • Remove all non-alphanumeric characters, except underscores, hyphens, and periods.
  • Replace all spaces and newlines with hyphens.
  • Convert all alphabetic characters to lowercase.
  • Remove everything up to the first letter (identifiers may not begin with a number or punctuation mark).
  • If nothing is left after this, use the identifier section.

I believe the solution is for me to update {sandpaper} to use the gfm_auto_identifiers extension instead, which should be updated here:

"auto_identifiers",

As for why #1-introduction is being transformed to #id_1-introduction, that's a bit of a mystery that I have to dig further into.

Originally posted by @zkamvar in carpentries/instructor-training#1497 (comment)

@zkamvar zkamvar self-assigned this Mar 6, 2023
@zkamvar zkamvar added the bug Something isn't working label Mar 6, 2023
@zkamvar zkamvar added the frequency: low indicator that a use-case has a low-frequency in lessons label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working frequency: low indicator that a use-case has a low-frequency in lessons
Projects
None yet
Development

No branches or pull requests

1 participant