rails/guides/rails_guides
Petrik a720480a0a Improve dom_id uniqueness in guides
All headers in a guide get a unique `dom_id` to make anchor links work.
If a header is already present we would prefix it with the `dom_id` of
the parent node. This would not work for headers without parent nodes.

This commit simplifies the `dom_id` uniqueness by only prepending the
parent node if it exists. This can still result in duplicates at the
same level, but for these we already show a warning:

    *** DUPLICATE ID: 'some_id', please make sure that there are no
    headings with the same name at the same level.

Co-authored-by: Carlos Antonio da Silva <carlosantoniodasilva@gmail.com>
2024-02-08 19:18:58 +01:00
..
markdown Use h1 for guide titles 2023-04-18 22:27:03 +02:00
epub_packer.rb Replaces mobi guide with epub for docs because of discontinued support 2022-08-05 00:18:20 +05:30
epub.rb Update rubocop-performance and enable more performance-related cops 2022-08-26 15:07:11 +03:00
generator.rb Improve dom_id uniqueness in guides 2024-02-08 19:18:58 +01:00
helpers.rb Replaces mobi guide with epub for docs because of discontinued support 2022-08-05 00:18:20 +05:30
markdown.rb Improve dom_id uniqueness in guides 2024-02-08 19:18:58 +01:00