Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Wonky mangulation of header tags when creating <a> tags for !TOC #43

Open
ssteinerx opened this issue Apr 26, 2017 · 0 comments
Open

Wonky mangulation of header tags when creating <a> tags for !TOC #43

ssteinerx opened this issue Apr 26, 2017 · 0 comments

Comments

@ssteinerx
Copy link

This file, test1.mdpp:

# test.mdpp -- **H1**

## Table of Contents below -- \<H2\>
!TOC

## Test H2 that includes "some things in quotes" ##
Moar text

Produces this:

# test2.mdpp -- **H1**

## Table of Contents below -- \<H2\>
1\.  [Test H2 that includes "some things in quotes" ##](#testh2thatincludes"somethingsinquotes"##)

<a name="testh2thatincludes"somethingsinquotes"##"></a>

## 1\. Test H2 that includes "some things in quotes" ##
Moar text

The header that has quoted text completely baffle the link creator and it puts together a name field that is strings of stuff with embedded double quotes and bare strings that shouldn't be valid even if they can accidentally be parsed. Who knows what evil lurks within the hearts of HTML parsers, really?

I didn't get any further than that in my current explorations because I'm really only after the !INCLUDE functionality, but some docs with warnings or smartening up the tag creator (with some edge-case bending tests) might be in order.

I don't have time to create a pull request now, I just wanted to record this before it got away.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants