1. Shlomi Fish
  2. asciidoc

Commits

Stuart Rackham  committed 8e48c88

Renamed 'list block' to more appropriate 'open block'.

  • Participants
  • Parent commits b74be37
  • Branches default

Comments (0)

Files changed (3)

File asciidoc.conf

View file
  • Ignore whitespace
 posattrs=style
 abstract-style=template="abstractblock"
 
-[blockdef-list]
+[blockdef-open]
+# A block without opening or closing tags.
 delimiter=^--$
-template=listblock
-options=list
+template=openblock
+options=sectionbody
 
-[listblock]
+[openblock]
 |
 
 [blockdef-pass]

File asciidoc.py

View file
  • Ignore whitespace
         else:
             template = self.parameters.template
             stag,etag = config.section2tags(template,self.attributes)
-            if 'sectionbody' in options or 'list' in options:
+            if 'sectionbody' in options:
                 # The body is treated like a section body.
                 writer.write(stag)
                 Section.translate_body(self)

File doc/asciidoc.txt

View file
  • Ignore whitespace
   QuoteBlock:       __________________________
   ExampleBlock:     ==========================
   Filter blocks:    ~~~~~~~~~~~~~~~~~~~~~~~~~~
+  OpenBlock:        --
 
 The <<X56,code>>, <<X57,source>> and <<X58,music>> filter blocks are
 detailed in the <<X59,Filters>> section.
 
 .Default DelimitedBlock substitutions
-[cols="2,5*^",options="header"]
-|==================================================================
-|              |Passthrough |Listing  |Literal  |Sidebar  |Quote
-|Callouts      |  No        | Yes     | Yes     | No      | No
-|Attributes    |  Yes       | No      | No      | Yes     | Yes
-|Inline Macros |  Yes       | No      | No      | Yes     | Yes
-|Quotes        |  No        | No      | No      | Yes     | Yes
-|Replacements  |  No        | No      | No      | Yes     | Yes
-|Special chars |  No        | Yes     | Yes     | Yes     | Yes
-|Special words |  No        | No      | No      | Yes     | Yes
-|==================================================================
+[cols="2strong,7*^",options="header,autowidth"]
+|=====================================================
+| |Attributes |Callouts |Macros | Quotes |Replacements
+|Special chars |Special words
+
+|PassthroughBlock |Yes |No  |Yes |No  |No  |No  |No
+|ListingBlock     |No  |Yes |No  |No  |No  |Yes |No
+|LiteralBlock     |No  |Yes |No  |No  |No  |Yes |No
+|SidebarBlock     |Yes |No  |Yes |Yes |Yes |Yes |Yes
+|QuoteBlock       |Yes |No  |Yes |Yes |Yes |Yes |Yes
+|ExampleBlock     |Yes |No  |Yes |Yes |Yes |Yes |Yes
+|OpenBlock        |Yes |No  |Yes |Yes |Yes |Yes |Yes
+|=====================================================
 
 Listing Blocks
 ~~~~~~~~~~~~~~
 [[X22]]
 Admonition Blocks
 ~~~~~~~~~~~~~~~~~
-The ExampleBlock definition includes a set of admonition
+The 'ExampleBlock' definition includes a set of admonition
 <<X23,styles>> (NOTE, TIP, IMPORTANT, WARNING, CAUTION) for generating
 admonition blocks (admonitions containing more than just a
 <<X28,simple paragraph>>).  Just precede the ExampleBlock with an
 
 See also <<X47,Admonition Icons and Captions>>.
 
+[[X29]]
+Open Blocks
+~~~~~~~~~~~
+An 'OpenBlock' renders the block contents without any opening or
+closing tags. The open block start and end delimiter is a single line
+containing two dashes. Enclosed element are rendered just as they
+would inside a section body. Open blocks are used for <<X15,list item
+continuation>>.
+
 
 [[X64]]
 Lists
 item with a 'list continuation' (a separator line containing a single
 plus character). Multiple block elements can be appended to a list
 item using list continuations (provided they are legal list item
-children in the backend markup).  Here is an example of list item
-continuation:
+children in the backend markup).
+
+Here are some examples of list item continuations: list item one
+contains multiple continuations; list item two is continued with an
+<<X29,OpenBlock>> containing multip elements:
 
 ---------------------------------------------------------------------
 1. List item one.
 +
 List item continued with a third paragraph.
 
-2. List item two.
-
-   List item two literal paragraph (no continuation required).
-
--  Nested list (item one).
-
-   Literal paragraph (no continuation required).
+2. List item two continued with an open block.
 +
-Paragraph appended to current list item.
-
--  Nested list item two.
+--
+This paragraph is part of the preceding list item.
+
+a. This list is nested and does not require explicit item continuation.
++
+This paragraph is part of the preceding list item.
+
+b. List item b.
+
+This paragraph belongs to item one of the outer list.
+--
 ---------------------------------------------------------------------
 
 Renders:
 +
 List item continued with a third paragraph.
 
-2. List item two.
-
-   List item two literal paragraph (no continuation required).
-
--  Nested list (item one).
-
-   Literal paragraph (no continuation required).
-+
-Paragraph appended to current list item.
-
--  Nested list item two.
-
-
-[[X29]]
-List Blocks
-~~~~~~~~~~~
-A 'List block' is a container for appending a collection of elements
-to a list item -- useful for long multi-element list items. The list
-block delimiter is a single line containing two dashes.  A list block
-must always be preceded by a <<X15,list continuation>> line. The list
-block can include any elements (provided they are legal list item
-children in the backend markup); you can even include lists with the
-same syntax as the parent list. List block example:
-
----------------------------------------------------------------------
-.List Block Example
-1. List item one.
+2. List item two continued with an open block.
 +
 --
 This paragraph is part of the preceding list item.
 This paragraph belongs to item one of the outer list.
 --
 
-2. Item two of the outer list.
----------------------------------------------------------------------
-
-Renders:
-
-.List Block Example
-1. List item one.
-+
---
-This paragraph is part of the preceding list item.
-
-a. This list is nested and does not require explicit item continuation.
-+
-This paragraph is part of the preceding list item.
-
-b. List item b.
-
-This paragraph belongs to item one of the outer list.
---
-
-2. Item two of the outer list.
-
 
 Footnotes
 ---------
 skip::
     The block is treated as a comment (see <<X26,CommentBlocks>>).
 
-list::
-    The block is a <<X29,list block>>.
-
 'presubs', 'postsubs' and 'filter' entries are meaningless when
 'sectionbody', 'skip' or 'list' options are set.