From 597a6666015d72c79dce4efb8d001a5fda18bcc1 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Wed, 20 Aug 2014 19:18:10 +0800 Subject: 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. --- guides/rails_guides/markdown.rb | 2 +- guides/source/4_2_release_notes.md | 2 +- 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. -- cgit v1.2.3