mirror of
https://github.com/prometheus/docs.git
synced 2026-02-06 18:44:55 +01:00
The generation of "Configuration" pages runs the config_linker.rb filter to add anchors to <placeholder> in code blocks. The generation of these anchors doesn't "slugify" the placeholder text, thus leading to anchors like <tls_config>. This is conflicting with the default anchors generated by the markdown compiler for the HTML headers, as well as the extra anchors injected by add_anchors.rb. In this PR I'm uniforming the way anchors are generated, to always "slugify" the text, and have links within the configuration code blocks working correctly. After this change, the id in the TOC also matches with the one of non-"Configuration" pages, which is currently different due to side effects introduced by the current logic. Fixes #1304 and #833. Signed-off-by: Marco Pracucci <marco@pracucci.com> Signed-off-by: Marco Pracucci <marco.pracucci@spreaker.com>