diff --git a/examples/config.yml b/examples/config.yml index f7d45fb..c46fb1b 100644 --- a/examples/config.yml +++ b/examples/config.yml @@ -61,7 +61,7 @@ http: <<: *css_classes format: html relative_urls: true - chapter_anchor_prefix: 'chapter-' + chapter_anchor_prefix: 'chapter' rss: <<: *paths diff --git a/lib/repubmark/elems/chapter.rb b/lib/repubmark/elems/chapter.rb index 1cb8a34..e13b72c 100644 --- a/lib/repubmark/elems/chapter.rb +++ b/lib/repubmark/elems/chapter.rb @@ -119,7 +119,7 @@ module Repubmark def build_title_html anchor_prefix = String(config[:chapter_anchor_prefix]).strip - anchor = %( id="#{anchor_prefix}#@slug") unless anchor_prefix.empty? + anchor = %( id="#{anchor_prefix}-#@slug") unless anchor_prefix.empty? "#@title\n" if @level != 1 end