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

markdown anchor links with _ need to be stripped when converting from wiki markdown #2

Closed
wants to merge 7 commits into from

Conversation

malcomio
Copy link

The IDs on https://docs.check-spelling.dev/Configuration.html are inconsistent, so some of the anchor links in the table of contents don't work

jsoref and others added 7 commits April 11, 2024 18:25
* Use GFM
* Use jekyll-theme-slate
The number of errors that check-spelling found in the documentation was
truly embarrassing.
@jsoref
Copy link
Member

jsoref commented May 19, 2024

Oh. Ouch. Sadly the links are from a different flavor of markdown (specifically GitHub's wiki markdown).

I'll have to figure out if I can easily fix the script that converts them.

@jsoref
Copy link
Member

jsoref commented May 21, 2024

I think I fixed this issue by adding this line:

$a =~ s/_//g;

and changing this line (to remove _ from the pattern):
$a =~ tr/[A-Z ]/[a-z\-]/;

I'm sorry that it's impossible to review the workflow runs / push log -- this repository is an amalgamation of a couple of things:

  • a wiki (where I evolve content changes using one flavor of GFM)
  • some scripts to massage from that GFM to the GFM used by gh-pages (🤯)
  • workflows to check-spelling (eating some 🐶 food)

Because the primary history is the wiki (and the fact that I don't like merges), the changes applied by the massaging script, the workflows, and the generated content don't actually survive (I could retain distinct commits for each evolution of the massaging scripts and the workflows, but I don't seem them as particularly valuable, and they can be recovered w/ effort).

github has changes how gh-pages works somewhat recently, so it's possible for me to actually drop the commit that contains the generated content and move it strictly to a github workflow that's responsible for publishing gh-pages, but I haven't had the time to do that (I also don't know much about that status of the gh-pages workflow stuff, it could be a beta feature 🤷 )...

Anyway, if you could give https://docs.check-spelling.dev/ a quick check to confirm that the content works as you expect, that'd be great.

Testing I've done:

  1. In https://docs.check-spelling.dev/Configuration.html#workflow-parameters, clicking
    GITHUB_TOKEN works
  2. In https://docs.check-spelling.dev/Event-descriptions.html, clicking unrecognized-spelling works.

@jsoref jsoref closed this May 21, 2024
@jsoref jsoref changed the title fix table of content links markdown anchor links with _ need to be stripped when converting from wiki markdown May 21, 2024
@malcomio malcomio deleted the toc branch May 22, 2024 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants