summaryrefslogtreecommitdiff
path: root/lib/banzai/filter/table_of_contents_filter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/banzai/filter/table_of_contents_filter.rb')
-rw-r--r--lib/banzai/filter/table_of_contents_filter.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/banzai/filter/table_of_contents_filter.rb b/lib/banzai/filter/table_of_contents_filter.rb
index 1a68d773048..ade4d260be1 100644
--- a/lib/banzai/filter/table_of_contents_filter.rb
+++ b/lib/banzai/filter/table_of_contents_filter.rb
@@ -31,6 +31,7 @@ module Banzai
if header_content = node.children.first
id = node
.text
+ .strip
.downcase
.gsub(PUNCTUATION_REGEXP, '') # remove punctuation
.tr(' ', '-') # replace spaces with dash