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

Links not working when some styling is used in the header on GitHub #25

Open
flyte opened this issue Mar 2, 2021 · 5 comments
Open

Comments

@flyte
Copy link

flyte commented Mar 2, 2021

Here I've used <small> and _ styling: https://github.com/flyte/pi-mqtt-gpio/blob/d49d599c6f2f04ba0c6c31c214fd0f49746cc170/config-doc.md

Here I've only used the _ styling: https://github.com/flyte/pi-mqtt-gpio/blob/e9be6b2056a2bedca8189729abd15e7ed645b839/config-doc.md

And here I've removed the _ styling and it works: https://github.com/flyte/pi-mqtt-gpio/blob/c9227fc9bc3abc2e87cb02a034acaa7b972fd60f/config-doc.md

@frnmst
Copy link
Owner

frnmst commented Mar 2, 2021

Hi,

have you got any documentational reference for the use of <small> and _. I can't find it in GFM

@flyte
Copy link
Author

flyte commented Mar 2, 2021

As far as <small> goes, it's not explicitly listed, but GFM allows HTML except for those tags on the blacklist.

Underscore for italics: https://guides.github.com/features/mastering-markdown/#syntax

@frnmst
Copy link
Owner

frnmst commented Mar 2, 2021

This might take a while to get fixed so here is another reference:

@frnmst frnmst added the bug label Mar 2, 2021
frnmst pushed a commit that referenced this issue Mar 26, 2021
@frnmst
Copy link
Owner

frnmst commented Mar 26, 2021

You can test HTML tag filtering using the bugfix-issue-25-anchor-header-links branch:

git clone https://github.com/frnmst/md-toc.git
git checkout bugfix-issue-25-anchor-header-links
make install-dev
wget https://github.com/flyte/pi-mqtt-gpio/blob/d49d599c6f2f04ba0c6c31c214fd0f49746cc170/config-doc.md
pipenv run python -m md_toc github config-doc.md

I still need to write the unit tests and documentation. Afterwards it will be the turn of https://spec.commonmark.org/0.28/#emphasis-and-strong-emphasis

frnmst pushed a commit that referenced this issue Apr 9, 2021
@frnmst
Copy link
Owner

frnmst commented Apr 10, 2021

Here is what I get with the current dev of md-toc. Some parts concerning the emphasis removal have not yet been implemented and will not be released in md-toc version 7.2.0, specifically rule 16 and 17 in https://spec.commonmark.org/0.28/#emphasis-and-strong-emphasis

https://github.com/flyte/pi-mqtt-gpio/blob/d49d599c6f2f04ba0c6c31c214fd0f49746cc170/config-doc.md

$ pipenv run python -m md_toc github -l6 config-doc.md`

- [MQTT IO Configuration](#mqtt-io-configuration)
- [`mqtt`](#mqtt)
  - [<small>_mqtt_.</small>`tls`](#mqtttls)
- [`gpio_modules`](#gpio_modules)
- [`sensor_modules`](#sensor_modules)
- [`stream_modules`](#stream_modules)
- [`digital_inputs`](#digital_inputs)
  - [<small>_digital_inputs.*_.</small>`ha_discovery`](#digital_inputsha_discovery)
- [`digital_outputs`](#digital_outputs)
  - [<small>_digital_outputs.*_.</small>`ha_discovery`](#digital_outputsha_discovery)
- [`sensor_inputs`](#sensor_inputs)
  - [<small>_sensor_inputs.*_.</small>`ha_discovery`](#sensor_inputsha_discovery)
- [`logging`](#logging)

@frnmst frnmst pinned this issue Jul 4, 2022
frnmst added a commit that referenced this issue Dec 18, 2022
- Fix some cmark emphasis detection and removal functions
  See issue #25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants