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 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'guides/rails_guides') 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 -- cgit v1.2.3