From 699babe8e30e9e2e9345c3117e404dff1e62c049 Mon Sep 17 00:00:00 2001 From: Juanito Fatas Date: Thu, 22 May 2014 16:14:31 +0800 Subject: Do not gsub non ASCII characters in header anchor. --- guides/rails_guides/markdown.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'guides/rails_guides/markdown.rb') diff --git a/guides/rails_guides/markdown.rb b/guides/rails_guides/markdown.rb index dbf7ff311d..1ea18ba9f5 100644 --- a/guides/rails_guides/markdown.rb +++ b/guides/rails_guides/markdown.rb @@ -47,8 +47,7 @@ module RailsGuides end def dom_id_text(text) - text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/[^a-z0-9]+/, ' ') - .strip.gsub(/\s+/, '-') + text.downcase.gsub(/\?/, '-questionmark').gsub(/!/, '-bang').gsub(/\s+/, '-') end def engine -- cgit v1.2.3