Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Reuse parent's id if it's already exists

  • Loading branch information...
commit 848d13a8aafccae1ae222ae4da20a35bf0bb6df3 1 parent efa7717
@sikachu sikachu authored sikachu committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  guides/rails_guides/markdown.rb
View
2  guides/rails_guides/markdown.rb
@@ -23,7 +23,7 @@ def render(body)
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
Please sign in to comment.
Something went wrong with that request. Please try again.