fix: add in special character tests#300
Conversation
456275d to
19f5b12
Compare
|
Am just awaiting a release of anchor-markdown-header which will resolve test failures. |
There was a problem hiding this comment.
Pull request overview
Adds regression coverage to ensure TOC anchor generation behaves correctly with a wide range of special characters (based on multiple historical issues) and updates an existing expectation for CRLF-related escaping.
Changes:
- Updated the CRLF fixture expectation to no longer percent-encode backslashes in the generated anchor.
- Added a new markdown fixture containing many “special character” headings from prior issues.
- Added a new test asserting the generated TOC output for that fixture.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| test/transform.js | Updates expected anchor output for the CRLF test case. |
| test/transform-weird-headers.js | Adds a new regression test covering many special-character headings. |
| test/fixtures/readme-with-special-characters.md | New fixture markdown containing headings with special characters to validate anchor behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
c8e6c8e to
86fcce2
Compare
86fcce2 to
79f7c77
Compare
|
Unfortunately i removed the wrong special character in the anchor generator. :( Hence have fixed this via thlorenz/anchor-markdown-header#61 |
Updated integrity hash for anchor-markdown-header package.
|
@AndrewSouthpaw could you review this pr along with #305 which will do a big cleanup and resolve a number of issues. 🙂 Followed by #303 & #307 after which we should trigger a release. |
|
Thank you for working on this ! I look forward to seeing the fix in the next release 💞 |
This ensures that special characters are being correctly handled and producing the expected results. The examples from the below issues have been added to a markdown file and a test added to compared it to the link generated by the github website.
Closes: #79
Closes: #92
Closes: #96
Closes: #97
Closes: #122
Closes: #138
Closes: #165
Closes: #172
Closes: #175
Closes: #182
Closes: #193
Closes: #223
Closes: #242
Closes: #260
Blocked by: thlorenz/anchor-markdown-header#52 & thlorenz/anchor-markdown-header#53
Note the update for above also
Closes: #167