jfcere / ngx-markdown

Angular markdown component/directive/pipe/service to parse static, dynamic or remote content to HTML with syntax highlight and more...
https://jfcere.github.io/ngx-markdown
MIT License
1.07k stars 182 forks source link

Missing header ids after updating from v16 to v17 #502

Closed Ross-Blakeney closed 9 months ago

Ross-Blakeney commented 9 months ago

Recently updated ngx-markdown from v16 to v17 when we also updated to angular v17.

It looks like the header id's are either no longer being generated or the sanitizer is stripping them out. We do disable the angular sanitizer.

Module config image

It looks like this is still the correct configuration in order to disable angular sanitizer. Looking at the v17 release notes, I see no indication of what else may have changed.

Disabling the sanitizer at on the markdown element does not have any impact.

jfcere commented 9 months ago

Hi @Ross-Blakeney,

The header ids are no longer generated "built-in" with marked 9.0, update that is part of ngx-markdown 17.0, but is instead available with a marked extension.

Please refer to this section of the README.md: https://github.com/jfcere/ngx-markdown?tab=readme-ov-file#marked-extensions

jfcere commented 9 months ago

Closing but don't hesitate if the answer doesn't resolve your issue.