aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--guides/rails_guides/markdown.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb
index 12eabcbcc8..6ad42769bc 100644
--- a/guides/rails_guides/markdown.rb
+++ b/guides/rails_guides/markdown.rb
@@ -23,7 +23,7 @@ module RailsGuides
private
def dom_id(nodes)
- nodes.map{ |node| node.text.downcase.gsub(/[^a-z0-9]+/, '-') }.join('-')
+ nodes.map{ |node| node[:id] ? node[:id] : node.text.downcase.gsub(/[^a-z0-9]+/, '-') }.join('-')
end
def engine