diff options
Diffstat (limited to 'lib/rdoc/markup')
-rw-r--r-- | lib/rdoc/markup/to_html.rb | 6 | ||||
-rw-r--r-- | lib/rdoc/markup/to_latex.rb | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/rdoc/markup/to_html.rb b/lib/rdoc/markup/to_html.rb index da42312ff5..4fe16f8e91 100644 --- a/lib/rdoc/markup/to_html.rb +++ b/lib/rdoc/markup/to_html.rb @@ -200,14 +200,14 @@ class RDoc::Markup::ToHtml < RDoc::Markup::Formatter gsub(/\.\.\.\./, '.…').gsub(/\.\.\./, '…'). # convert single closing quote - gsub(%r{([^ \t\r\n\[\{\(])\'}) { "#$1’" }. - gsub(%r{\'(?=\W|s\b)}) { "’" }. + gsub(%r{([^ \t\r\n\[\{\(])\'}, '\1’'). + gsub(%r{\'(?=\W|s\b)}, '’'). # convert single opening quote gsub(/'/, '‘'). # convert double closing quote - gsub(%r{([^ \t\r\n\[\{\(])\'(?=\W)}) { "#$1”" }. + gsub(%r{([^ \t\r\n\[\{\(])\'(?=\W)}, '\1”'). # convert double opening quote gsub(/'/, '“'). diff --git a/lib/rdoc/markup/to_latex.rb b/lib/rdoc/markup/to_latex.rb index a679b3b06e..bbf958f2ed 100644 --- a/lib/rdoc/markup/to_latex.rb +++ b/lib/rdoc/markup/to_latex.rb @@ -227,14 +227,14 @@ class RDoc::Markup::ToLaTeX < RDoc::Markup::Formatter gsub(/\.\.\.\./, '.\ldots{}').gsub(/\.\.\./, '\ldots{}'). # convert single closing quote - gsub(%r{([^ \t\r\n\[\{\(])\'}) { "#$1'" }. - gsub(%r{\'(?=\W|s\b)}) { "'" }. + gsub(%r{([^ \t\r\n\[\{\(])\'}, '\1\''). + gsub(%r{\'(?=\W|s\b)}, "'" ). # convert single opening quote gsub(/'/, '`'). # convert double closing quote - gsub(%r{([^ \t\r\n\[\{\(])\"(?=\W)}) { "#$1''" }. + gsub(%r{([^ \t\r\n\[\{\(])\"(?=\W)}, "\\1''"). # convert double opening quote gsub(/"/, "``"). |