[前][次][番号順一覧][スレッド一覧]

ruby-changes:72745

From: Burdette <ko1@a...>
Date: Fri, 29 Jul 2022 23:40:39 +0900 (JST)
Subject: [ruby-changes:72745] f78e46d404 (master): [ruby/rdoc] Add block quotes (https://github.com/ruby/rdoc/pull/907)

https://git.ruby-lang.org/ruby.git/commit/?id=f78e46d404

From f78e46d404f156cc05066c4d895fd6bdef4aec7c Mon Sep 17 00:00:00 2001
From: Burdette Lamar <BurdetteLamar@Y...>
Date: Fri, 29 Jul 2022 09:40:12 -0500
Subject: [ruby/rdoc] Add block quotes (https://github.com/ruby/rdoc/pull/907)

Also adjusts which blocks may be nested.

https://github.com/ruby/rdoc/commit/dde1860441
---
 doc/rdoc/markup_reference.rb | 66 ++++++++++++++++++++++++++++++++++++++------
 1 file changed, 57 insertions(+), 9 deletions(-)

diff --git a/doc/rdoc/markup_reference.rb b/doc/rdoc/markup_reference.rb
index cc682f987e..49ad996c2d 100644
--- a/doc/rdoc/markup_reference.rb
+++ b/doc/rdoc/markup_reference.rb
@@ -57,6 +57,7 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L57
 # - {Paragraphs}[rdoc-ref:RDoc::MarkupReference@Paragraphs].
 # - {Verbatim text blocks}[rdoc-ref:RDoc::MarkupReference@Verbatim+Text+Blocks].
 # - {Code blocks}[rdoc-ref:RDoc::MarkupReference@Code+Blocks].
+# - {Block quotes}[rdoc-ref:RDoc::MarkupReference@Block+Quotes].
 # - {Bullet lists}[rdoc-ref:RDoc::MarkupReference@Bullet+Lists].
 # - {Numbered lists}[rdoc-ref:RDoc::MarkupReference@Numbered+Lists].
 # - {Lettered lists}[rdoc-ref:RDoc::MarkupReference@Lettered+Lists].
@@ -99,7 +100,10 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L100
 #
 # - Verbatim text blocks.
 # - Code blocks.
+# - Block quotes.
 # - Lists of any type.
+# - Headings.
+# - Horizontal rules.
 #
 # ==== Verbatim Text Blocks
 #
@@ -169,6 +173,49 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L173
 # Pro tip:  If your indented Ruby code does not get highlighted,
 # it may contain a syntax error.
 #
+# ==== Block Quotes
+#
+# You can use the characters <tt>>>></tt> (unindented),
+# followed by indented text, to treat the text
+# as a {block quote}[https://en.wikipedia.org/wiki/Block_quotation]:
+#
+# Example input:
+#
+#   >>>
+#     Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
+#     commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
+#     Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
+#
+#     Aenean congue ligula eu ligula molestie, eu pellentesque purus
+#     faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
+#     diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
+#     purus magna ut tortor.
+#
+# Rendered HTML:
+#
+# >>>
+#   Lorem ipsum dolor sit amet, consectetur adipiscing elit. Integer
+#   commodo quam iaculis massa posuere, dictum fringilla justo pulvinar.
+#   Quisque turpis erat, pharetra eu dui at, sollicitudin accumsan nulla.
+#
+#   Aenean congue ligula eu ligula molestie, eu pellentesque purus
+#   faucibus. In id leo non ligula condimentum lobortis. Duis vestibulum,
+#   diam in pellentesque aliquet, mi tellus placerat sapien, id euismod
+#   purus magna ut tortor.
+#
+# A block quote may contain nested blocks, including:
+#
+# - Other block quotes.
+# - Paragraphs.
+# - Verbatim text blocks.
+# - Code blocks.
+# - Lists of any type.
+# - Headings.
+# - Horizontal rules.
+#
+# Note that, unlike verbatim text, single newlines are not honored,
+# but that a double newline begins a new paragraph in the block quote.
+#
 # ==== Lists
 #
 # Each type of list item is marked by a special beginning:
@@ -190,6 +237,16 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L237
 # A list item may be continued on additional lines that are aligned
 # with the first line.  See examples below.
 #
+# A list item may contain nested blocks, including:
+#
+# - Other lists of any type.
+# - Paragraphs.
+# - Verbatim text blocks.
+# - Code blocks.
+# - Block quotes.
+# - Headings.
+# - Horizontal rules.
+#
 # ===== Bullet Lists
 #
 # A bullet list item begins with a hyphen or asterisk.
@@ -291,15 +348,6 @@ require 'rdoc' https://github.com/ruby/ruby/blob/trunk/doc/rdoc/markup_reference.rb#L348
 #   [bar baz] Yet another.
 #   bam:: Last one.
 #
-# ===== Blocks Nested in Lists
-#
-# A list item may contain nested blocks, including:
-#
-# - Paragraphs.
-# - Verbatim text blocks.
-# - Code blocks.
-# - Other lists of any type.
-#
 # ==== Headings
 #
 # A heading begins with up to six equal-signs, followed by heading text.
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]