diff options
author | Xavier Noria <fxn@hashref.com> | 2014-08-20 13:54:13 +0200 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2014-08-20 13:54:13 +0200 |
commit | 591da218578727f3967e25f8028d8dd90621b35b (patch) | |
tree | 1f50b138009101dfda569029f8b547ab5be715ed /guides/rails_guides/markdown.rb | |
parent | ac5b5461d1822117e114c3d3b6684c6a98f1b694 (diff) | |
parent | 597a6666015d72c79dce4efb8d001a5fda18bcc1 (diff) | |
download | rails-591da218578727f3967e25f8028d8dd90621b35b.tar.gz rails-591da218578727f3967e25f8028d8dd90621b35b.tar.bz2 rails-591da218578727f3967e25f8028d8dd90621b35b.zip |
Merge pull request #16581 from JuanitoFatas/guides-anchor-link
Revert "Do not gsub non ASCII characters in header anchor.".
Diffstat (limited to 'guides/rails_guides/markdown.rb')
-rw-r--r-- | guides/rails_guides/markdown.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index 1ea18ba9f5..b422a80759 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -47,7 +47,7 @@ module RailsGuides end def dom_id_text(text) - text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/\s+/, '-') + text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/[^a-z0-9]+/, ' ').strip.gsub(/\s+/, '-') end def engine |