From 23a84d53c682e8db1d9d5b9b33fc20dc475179c2 Mon Sep 17 00:00:00 2001 From: Burdette Lamar Date: Sun, 7 Aug 2022 07:07:12 -0500 Subject: [ruby/rdoc] [DOC] Removes remaining old Markup Reference (https://github.com/ruby/rdoc/pull/910) https://github.com/ruby/rdoc/commit/4e44c9c6cf --- doc/rdoc/markup_reference.rb | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'doc/rdoc/markup_reference.rb') diff --git a/doc/rdoc/markup_reference.rb b/doc/rdoc/markup_reference.rb index 49ad996c2d..c59f12cfe3 100644 --- a/doc/rdoc/markup_reference.rb +++ b/doc/rdoc/markup_reference.rb @@ -662,6 +662,37 @@ require 'rdoc' # # [Two words] Two words in labeled list item. # # ====== Two words in heading # +# ==== Escaping Text Markup +# +# Text markup can be escaped with a backslash, as in \, which was obtained +# with \\. Except in verbatim sections and between \ tags, +# to produce a backslash you have to double it unless it is followed by a +# space, tab or newline. Otherwise, the HTML formatter will discard it, as it +# is used to escape potential links: +# +# * The \ must be doubled if not followed by white space: \\. +# * But not in \ tags: in a Regexp, \S matches non-space. +# * This is a link to {ruby-lang}[https://www.ruby-lang.org]. +# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org]. +# * This will not be linked to \RDoc::RDoc#document +# +# generates: +# +# * The \ must be doubled if not followed by white space: \\. +# * But not in \ tags: in a Regexp, \S matches non-space. +# * This is a link to {ruby-lang}[https://www.ruby-lang.org] +# * This is not a link, however: \{ruby-lang.org}[https://www.ruby-lang.org] +# * This will not be linked to \RDoc::RDoc#document +# +# Inside \ tags, more precisely, leading backslashes are removed only if +# followed by a markup character (<*_+), a backslash, or a known link +# reference (a known class or method). So in the example above, the backslash +# of \S would be removed if there was a class or module named +S+ in +# the current context. +# +# This behavior is inherited from RDoc version 1, and has been kept for +# compatibility with existing RDoc documentation. +# # ==== Character Conversions # # Certain combinations of characters may be converted to special characters; -- cgit v1.2.3