nojronatron / markdown-toc

VSCode Extension adds table of contents to an existing markdown file.
https://marketplace.visualstudio.com/items?itemName=jon-rumsey-dev.jr-markdowntoc-vscode
MIT License
1 stars 0 forks source link

Comma and Period characters cause generation of invalid link fragments #19

Closed nojronatron closed 2 months ago

nojronatron commented 4 months ago

Describe the bug

Level 2 headings that contain a period or comma are not properly handled. Link Fragments should not contain a period or a comma but they do.

To Reproduce

  1. Create a heading like ## .Net Aspire.
  2. Create another heading like ## Asp Net Core, Blazor, and SSR
  3. Open the Command Palette and select Create Table of Contents.
  4. See error in the generated table of contents.

Expected behavior

Link Fragments do NOT contain periods or commas and when clicked the user's view is moved to the target heading.

Screenshots

If applicable, add screenshots to help explain your problem.

Environment

Additional context

Add any other context about the problem here.

nojronatron commented 2 months ago

Fixed with PR #20