aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2014-08-20 13:54:13 +0200
committerXavier Noria <fxn@hashref.com>2014-08-20 13:54:13 +0200
commit591da218578727f3967e25f8028d8dd90621b35b (patch)
tree1f50b138009101dfda569029f8b547ab5be715ed
parentac5b5461d1822117e114c3d3b6684c6a98f1b694 (diff)
parent597a6666015d72c79dce4efb8d001a5fda18bcc1 (diff)
downloadrails-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.".
-rw-r--r--guides/rails_guides/markdown.rb2
-rw-r--r--guides/source/4_2_release_notes.md2
2 files changed, 2 insertions, 2 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
diff --git a/guides/source/4_2_release_notes.md b/guides/source/4_2_release_notes.md
index d362c8cd58..aa056f5844 100644
--- a/guides/source/4_2_release_notes.md
+++ b/guides/source/4_2_release_notes.md
@@ -26,7 +26,7 @@ coverage before going in. You should also first upgrade to Rails 4.1 in case you
haven't and make sure your application still runs as expected before attempting
to upgrade to Rails 4.2. A list of things to watch out for when upgrading is
available in the
-[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-4.1-to-rails-4.2)
+[Upgrading Ruby on Rails](upgrading_ruby_on_rails.html#upgrading-from-rails-4-1-to-rails-4-2)
guide.