aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorJuanito Fatas <katehuang0320@gmail.com>2014-08-20 19:18:10 +0800
committerJuanito Fatas <katehuang0320@gmail.com>2014-08-20 19:18:10 +0800
commit597a6666015d72c79dce4efb8d001a5fda18bcc1 (patch)
tree1f50b138009101dfda569029f8b547ab5be715ed /guides
parentac5b5461d1822117e114c3d3b6684c6a98f1b694 (diff)
downloadrails-597a6666015d72c79dce4efb8d001a5fda18bcc1.tar.gz
rails-597a6666015d72c79dce4efb8d001a5fda18bcc1.tar.bz2
rails-597a6666015d72c79dce4efb8d001a5fda18bcc1.zip
Revert "Do not gsub non ASCII characters in header anchor.".
This reverts commit 699babe. Also change the upgrading_ruby_on_rails link back to original in 4_2_release_notes.
Diffstat (limited to 'guides')
-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.