Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r84932 - in trunk/tools/quickbook: doc src test
From: dnljms_at_[hidden]
Date: 2013-07-01 15:34:07


Author: danieljames
Date: 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013)
New Revision: 84932
URL: http://svn.boost.org/trac/boost/changeset/84932

Log:
Make nested paragraphs/code blocks in lists an error in 1.6.

They're now a 1.7 feature. Will revert to 1.5 behaviour before 1.6 final.

Added:
   trunk/tools/quickbook/test/list_test-1_6-fail.quickbook (contents, props changed)
   trunk/tools/quickbook/test/list_test-1_7.gold
      - copied, changed from r84931, trunk/tools/quickbook/test/list_test-1_6.gold
   trunk/tools/quickbook/test/list_test-1_7.quickbook
      - copied, changed from r84931, trunk/tools/quickbook/test/list_test-1_6.quickbook
Text files modified:
   trunk/tools/quickbook/doc/1_6.qbk | 70 ++++++++++----------
   trunk/tools/quickbook/doc/change_log.qbk | 5 +
   trunk/tools/quickbook/src/main_grammar.cpp | 12 +++
   trunk/tools/quickbook/test/Jamfile.v2 | 2
   trunk/tools/quickbook/test/list_test-1_6-fail.quickbook | 46 ++++++++++++++
   trunk/tools/quickbook/test/list_test-1_6.gold | 128 ---------------------------------------
   trunk/tools/quickbook/test/list_test-1_6.quickbook | 39 ------------
   trunk/tools/quickbook/test/list_test-1_7.quickbook | 2
   8 files changed, 101 insertions(+), 203 deletions(-)

Modified: trunk/tools/quickbook/doc/1_6.qbk
==============================================================================
--- trunk/tools/quickbook/doc/1_6.qbk Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/doc/1_6.qbk 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -8,7 +8,7 @@
 ]
 
 [chapter Language Versions
- [quickbook 1.6]
+ [quickbook 1.7]
     [compatibility-mode 1.5]
     [id quickbook.versions]
     [source-mode teletype]
@@ -313,40 +313,6 @@
 
 [endsect]
 
-[section:listparagraphs Pargraphs in lists]
-
-I'm still refining this, but paragraphs and block elements can now be used
-in lists:
-
-[pre
-* Para 1
-
- Para 2
- * Nested Para 1
-
- Nested Para 2
-
- Code block
- Para 3
-]
-
-generates:
-
-* Para 1
-
- Para 2
- * Nested Para 1
-
- Nested Para 2
-
- Code block
- Para 3
-
-The docbook markup that this generates is pretty bad, but seems to create okay
-html.
-
-[endsect]
-
 [endsect] [/ Quickbok 1.6]
 
 [section:1_7 Quickbook 1.7]
@@ -414,6 +380,40 @@
 
 [endsect] [/escaped_docinfo_attributes]
 
+[section:listparagraphs Pargraphs in lists]
+
+I'm still refining this, but paragraphs and block elements can now be used
+in lists:
+
+[pre
+* Para 1
+
+ Para 2
+ * Nested Para 1
+
+ Nested Para 2
+
+ Code block
+ Para 3
+]
+
+generates:
+
+* Para 1
+
+ Para 2
+ * Nested Para 1
+
+ Nested Para 2
+
+ Code block
+ Para 3
+
+The docbook markup that this generates is pretty bad, but seems to create okay
+html.
+
+[endsect]
+
 [section:templates_in_link_values Templates in link values]
 
 There's very premilinary support for calling templates in link values. A lot

Modified: trunk/tools/quickbook/doc/change_log.qbk
==============================================================================
--- trunk/tools/quickbook/doc/change_log.qbk Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/doc/change_log.qbk 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -296,3 +296,8 @@
   * Convert to use `boost::string_ref`.
   * Clean up the source map implementation (used to get the correct
     location for error messages in things like templates and snippets).
+
+[heading Version 1.6.0 alpha]
+
+* Remove nested blocks in lists from 1.6, move to 1.7.
+ (Can still nest block elements in lists though).

Modified: trunk/tools/quickbook/src/main_grammar.cpp
==============================================================================
--- trunk/tools/quickbook/src/main_grammar.cpp Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/src/main_grammar.cpp 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -438,8 +438,8 @@
>> (cl::ch_p('*') | '#')
>> (*cl::blank_p) [local.list.still_in_block = true]
>> *( cl::eps_p(local.list.still_in_block)
- >> ( qbk_ver(106u) >> local.list_item(element_info::only_block)
- | qbk_ver(0, 106u) >> local.list_item(element_info::only_list_block)
+ >> ( qbk_ver(107u) >> local.list_item(element_info::only_block)
+ | qbk_ver(0, 107u) >> local.list_item(element_info::only_list_block)
                     )
                 )
                 // TODO: This is sometimes called in the wrong place. Currently
@@ -1053,6 +1053,14 @@
 
                 block_type = block_types::paragraph;
             }
+
+ if (qbk_version_n == 106u && !list_stack.top().root) {
+ detail::outerr(state_.current_file, first)
+ << "Nested blocks in lists won't be supported in "
+ << "quickbook 1.6"
+ << std::endl;
+ ++state_.error_count;
+ }
         }
         else {
             clear_stack();

Modified: trunk/tools/quickbook/test/Jamfile.v2
==============================================================================
--- trunk/tools/quickbook/test/Jamfile.v2 Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/test/Jamfile.v2 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -70,6 +70,8 @@
     [ quickbook-test link-1_7 ]
     [ quickbook-test list_test-1_5 ]
     [ quickbook-test list_test-1_6 ]
+ [ quickbook-error-test list_test-1_6-fail ]
+ [ quickbook-test list_test-1_7 ]
     [ quickbook-test macro-1_5 ]
     [ quickbook-test macro-1_6 ]
     [ quickbook-error-test mismatched_brackets-1_1-fail ]

Added: trunk/tools/quickbook/test/list_test-1_6-fail.quickbook
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/tools/quickbook/test/list_test-1_6-fail.quickbook 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -0,0 +1,46 @@
+[article List Test
+[quickbook 1.6]
+]
+
+Markup in list:
+
+* [table [[Heading]][[Cell]]]
+* [heading The heading for a list item]
+
+ The content of the list item.
+
+[section Paragraphs in list items]
+
+* A1
+
+ A2
+
+* B1
+ * C1
+
+ C2
+
+ B2
+
+* D1
+ * E1
+
+ E2
+
+ E3
+
+ D2
+
+[endsect]
+
+[section Indented code blocks in lists]
+
+* A
+
+ B
+ C
+* D
+
+ E
+* F
+[endsect]

Modified: trunk/tools/quickbook/test/list_test-1_6.gold
==============================================================================
--- trunk/tools/quickbook/test/list_test-1_6.gold Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/test/list_test-1_6.gold 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -309,43 +309,6 @@
         </footnote>
       </simpara>
     </listitem>
- <listitem>
- <simpara>
- <informaltable frame="all">
- <tgroup cols="1">
- <thead>
- <row>
- <entry>
- <para>
- Heading
- </para>
- </entry>
- </row>
- </thead>
- <tbody>
- <row>
- <entry>
- <para>
- Cell
- </para>
- </entry>
- </row>
- </tbody>
- </tgroup>
- </informaltable>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- <bridgehead renderas="sect2" id="list_test.h0">
- <phrase id="list_test.the_heading_for_a_list_item"/><link linkend="list_test.the_heading_for_a_list_item">The
- heading for a list item</link>
- </bridgehead>
- <para>
- The content of the list item.
- </para>
- </simpara>
- </listitem>
   </itemizedlist>
   <para>
     Don't end list with comment 1:
@@ -426,99 +389,12 @@
     <itemizedlist>
       <listitem>
         <simpara>
- One
- </simpara>
- </listitem>
- </itemizedlist>
- <section id="list_test.list_immediately_following_mark0.nested_section">
- <title><link linkend="list_test.list_immediately_following_mark0.nested_section">Nested
- section</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- Two
- </simpara>
- </listitem>
- </itemizedlist>
- </section>
- </section>
- <section id="list_test.paragraphs_in_list_items">
- <title><link linkend="list_test.paragraphs_in_list_items">Paragraphs in list
- items</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- A1
- <para>
- A2
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- B1
- <itemizedlist>
- <listitem>
- <simpara>
- C1
- <para>
- C2
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- B2
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- D1
- <itemizedlist>
- <listitem>
- <simpara>
- E1
- <para>
- E2
- </para>
- <para>
- E3
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- <para>
- D2
- </para>
- </simpara>
- </listitem>
- </itemizedlist>
- </section>
- <section id="list_test.indented_code_blocks_in_lists">
- <title><link linkend="list_test.indented_code_blocks_in_lists">Indented code
- blocks in lists</link></title>
- <itemizedlist>
- <listitem>
- <simpara>
- A
-<programlisting><phrase role="identifier">B</phrase>
-</programlisting>
- <para>
- C
- </para>
- </simpara>
- </listitem>
- <listitem>
- <simpara>
- D
-<programlisting><phrase role="identifier">E</phrase>
-</programlisting>
+ One [section Nested section]
         </simpara>
       </listitem>
       <listitem>
         <simpara>
- F
+ Two [endsect]
         </simpara>
       </listitem>
     </itemizedlist>

Modified: trunk/tools/quickbook/test/list_test-1_6.quickbook
==============================================================================
--- trunk/tools/quickbook/test/list_test-1_6.quickbook Mon Jul 1 15:33:33 2013 (r84931)
+++ trunk/tools/quickbook/test/list_test-1_6.quickbook 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -73,10 +73,6 @@
 * [*Bold]
 * ["Quoted]
 * [footnote Footnote]
-* [table [[Heading]][[Cell]]]
-* [heading The heading for a list item]
-
- The content of the list item.
 
 Don't end list with comment 1:
 
@@ -108,40 +104,5 @@
 [section Nested section]
 * Two
 [endsect]
-[endsect]
-
-[section Paragraphs in list items]
-
-* A1
-
- A2
-
-* B1
- * C1
-
- C2
-
- B2
-
-* D1
- * E1
-
- E2
-
- E3
-
- D2
-
-[endsect]
-
-[section Indented code blocks in lists]
-
-* A
-
- B
- C
-* D
 
- E
-* F
 [endsect]

Copied and modified: trunk/tools/quickbook/test/list_test-1_7.gold (from r84931, trunk/tools/quickbook/test/list_test-1_6.gold)
==============================================================================

Copied and modified: trunk/tools/quickbook/test/list_test-1_7.quickbook (from r84931, trunk/tools/quickbook/test/list_test-1_6.quickbook)
==============================================================================
--- trunk/tools/quickbook/test/list_test-1_6.quickbook Mon Jul 1 15:33:33 2013 (r84931, copy source)
+++ trunk/tools/quickbook/test/list_test-1_7.quickbook 2013-07-01 15:34:07 EDT (Mon, 01 Jul 2013) (r84932)
@@ -1,5 +1,5 @@
 [article List Test
-[quickbook 1.6]
+[quickbook 1.7]
 ]
 
 Simple list:


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk