Skip to content

Commit dde1860

Browse files
Add block quotes (#907)
Also adjusts which blocks may be nested.
1 parent 2cdba4a commit dde1860

File tree

1 file changed

+57
-9
lines changed

1 file changed

+57
-9
lines changed

doc/rdoc/markup_reference.rb

Lines changed: 57 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
# - {Paragraphs}[rdoc-ref:RDoc::MarkupReference@Paragraphs].
5858
# - {Verbatim text blocks}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks].
5959
# - {Code blocks}[rdoc-ref:RDoc::MarkupReference@Code+Blocks].
60+
# - {Block quotes}[rdoc-ref:RDoc::MarkupReference@Block+Quotes].
6061
# - {Bullet lists}[rdoc-ref:RDoc::MarkupReference@Bullet+Lists].
6162
# - {Numbered lists}[rdoc-ref:RDoc::MarkupReference@Numbered+Lists].
6263
# - {Lettered lists}[rdoc-ref:RDoc::MarkupReference@Lettered+Lists].
@@ -99,7 +100,10 @@
99100
#
100101
# - Verbatim text blocks.
101102
# - Code blocks.
103+
# - Block quotes.
102104
# - Lists of any type.
105+
# - Headings.
106+
# - Horizontal rules.
103107
#
104108
# ==== Verbatim Text Blocks
105109
#
@@ -169,6 +173,49 @@
169173
# Pro tip: If your indented Ruby code does not get highlighted,
170174
# it may contain a syntax error.
171175
#
176+
# ==== Block Quotes
177+
#
178+
# You can use the characters <tt>>>></tt> (unindented),
179+
# followed by indented text, to treat the text
180+
# as a {block quote}[https://en.wikipedia.org/wiki/Block_quotation]:
181+
#
182+
# Example input:
183+
#
184+
# >>>
185+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
186+
# commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
187+
# Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
188+
#
189+
# Aenean congue ligula eu ligula molestie, eu pellentesque purus
190+
# faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
191+
# diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
192+
# purus magna ut tortor.
193+
#
194+
# Rendered HTML:
195+
#
196+
# >>>
197+
# Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
198+
# commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
199+
# Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
200+
#
201+
# Aenean congue ligula eu ligula molestie, eu pellentesque purus
202+
# faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
203+
# diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
204+
# purus magna ut tortor.
205+
#
206+
# A block quote may contain nested blocks, including:
207+
#
208+
# - Other block quotes.
209+
# - Paragraphs.
210+
# - Verbatim text blocks.
211+
# - Code blocks.
212+
# - Lists of any type.
213+
# - Headings.
214+
# - Horizontal rules.
215+
#
216+
# Note that, unlike verbatim text, single newlines are not honored,
217+
# but that a double newline begins a new paragraph in the block quote.
218+
#
172219
# ==== Lists
173220
#
174221
# Each type of list item is marked by a special beginning:
@@ -190,6 +237,16 @@
190237
# A list item may be continued on additional lines that are aligned
191238
# with the first line. See examples below.
192239
#
240+
# A list item may contain nested blocks, including:
241+
#
242+
# - Other lists of any type.
243+
# - Paragraphs.
244+
# - Verbatim text blocks.
245+
# - Code blocks.
246+
# - Block quotes.
247+
# - Headings.
248+
# - Horizontal rules.
249+
#
193250
# ===== Bullet Lists
194251
#
195252
# A bullet list item begins with a hyphen or asterisk.
@@ -291,15 +348,6 @@
291348
# [bar baz] Yet another.
292349
# bam:: Last one.
293350
#
294-
# ===== Blocks Nested in Lists
295-
#
296-
# A list item may contain nested blocks, including:
297-
#
298-
# - Paragraphs.
299-
# - Verbatim text blocks.
300-
# - Code blocks.
301-
# - Other lists of any type.
302-
#
303351
# ==== Headings
304352
#
305353
# A heading begins with up to six equal-signs, followed by heading text.

0 commit comments

Comments
 (0)