Skip to content

Commit

Permalink
fix: Expand table columns in text output
Browse files Browse the repository at this point in the history
  • Loading branch information
kesara committed Oct 18, 2022
1 parent 5a7fb22 commit 7cb0494
Show file tree
Hide file tree
Showing 9 changed files with 388 additions and 389 deletions.
26 changes: 13 additions & 13 deletions tests/valid/draft-miek-test.pages.text
Original file line number Diff line number Diff line change
Expand Up @@ -1029,19 +1029,19 @@ A.8. Table Tests
Table 1: Demonstration of
simple table syntax.

+==========+=========+=========+==============================+
| Centered | Default | Right | Left Aligned |
| Header | Aligned | Aligned | |
+==========+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+----------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+----------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple
lines. This is a multiline table. This is verbatim text.
+=================+=========+=========+==============================+
| Centered Header | Default | Right | Left Aligned |
| | Aligned | Aligned | |
+=================+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+-----------------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+-----------------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple lines.
This is a multiline table. This is verbatim text.


+=========+=======+==================+
Expand Down
26 changes: 13 additions & 13 deletions tests/valid/draft-miek-test.text
Original file line number Diff line number Diff line change
Expand Up @@ -867,19 +867,19 @@ A.8. Table Tests
Table 1: Demonstration of
simple table syntax.

+==========+=========+=========+==============================+
| Centered | Default | Right | Left Aligned |
| Header | Aligned | Aligned | |
+==========+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+----------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+----------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple
lines. This is a multiline table. This is verbatim text.
+=================+=========+=========+==============================+
| Centered Header | Default | Right | Left Aligned |
| | Aligned | Aligned | |
+=================+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+-----------------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+-----------------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple lines.
This is a multiline table. This is verbatim text.


+=========+=======+==================+
Expand Down
26 changes: 13 additions & 13 deletions tests/valid/draft-miek-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1029,19 +1029,19 @@ A.8. Table Tests
Table 1: Demonstration of
simple table syntax.

+==========+=========+=========+==============================+
| Centered | Default | Right | Left Aligned |
| Header | Aligned | Aligned | |
+==========+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+----------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+----------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple
lines. This is a multiline table. This is verbatim text.
+=================+=========+=========+==============================+
| Centered Header | Default | Right | Left Aligned |
| | Aligned | Aligned | |
+=================+=========+=========+==============================+
| First | row | 12.0 | Example of a row that spans |
| | | | multiple lines. |
+-----------------+---------+---------+------------------------------+
| Second | row | 5.0 | Here's another one. Note |
| | | | the blank line between rows. |
+-----------------+---------+---------+------------------------------+

Table 2: Here's the caption. It, too, may span multiple lines.
This is a multiline table. This is verbatim text.


+=========+=======+==================+
Expand Down
162 changes: 81 additions & 81 deletions tests/valid/elements.bom.text
Original file line number Diff line number Diff line change
Expand Up @@ -582,28 +582,27 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
| | | | |
+-----+-----+-----+-----+

+===============================+=====================+=========+
| A | B | C D |
+===============================+=====================+====+====+
| 1 | 2 | 3 | 4 |
+===============================+=====================+====+====+
| Long text in a single cell | b1 | c1 | d1 |
+-------------------------------+---------------------+----+----+
| Long text in a 3-cell column. | Long text in a 3-cell row. |
| Quid igitur est? Inquit; | Quid enim est a Cyrenaicisque |
| audire enim cupio, quid non | melius liberiusque |
| probes eius, a quo | defenditur, tamen eius modi |
| dissentias. | tempora incidunt, ut labore |
| | et dolore disputandum putant. |
| +---------------------+----+----+
| | Another 3-cell | c3 | d3 |
| | column. +----+----+
| | | x |
+-------------------------------+ +----+----+
| a5 | | c5 | d5 |
+-------------------------------+---------------------+----+----+
| aa | bb | cc | dd |
+-------------------------------+---------------------+----+----+
+================================+============================+=========+
| A | B | C D |
+================================+============================+====+====+
| 1 | 2 | 3 | 4 |
+================================+============================+====+====+
| Long text in a single cell | b1 | c1 | d1 |
+--------------------------------+----------------------------+----+----+
| Long text in a 3-cell column. | Long text in a 3-cell row. |
| Quid igitur est? Inquit; | Quid enim est a Cyrenaicisque melius |
| audire enim cupio, quid non | liberiusque defenditur, tamen eius |
| probes eius, a quo dissentias. | modi tempora incidunt, ut labore et |
| | dolore disputandum putant. |
| +----------------------------+----+----+
| | Another 3-cell column. | c3 | d3 |
| | +----+----+
| | | x |
+--------------------------------+ +----+----+
| a5 | | c5 | d5 |
+--------------------------------+----------------------------+----+----+
| aa | bb | cc | dd |
+--------------------------------+----------------------------+----+----+

Table 1: Header, footer, colspan and rowspan
Default alignment
Expand All @@ -613,26 +612,23 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018




Author, et al. Expires 13 January 2019 [Page 11]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


+========+========+=================+=====+=====+=========+=========+
|Column |Column |Column |TC |TC | TC | TC |
|Title 1 |Tilte 2 |Title |4 |5 | 6 | 7 |
| | |3 | | | | |
| | +==+==+==+==+==+==+==+==+==+==+====+====+====+====+
| | |C1|C2|C3|C4|C5|C6|C1|C2|C1|C2| C1 | C2 | C1 | C2 |
+========+========+==+==+==+==+==+==+==+==+==+==+====+====+====+====+
|Major |Minor |x |x |x |x |x |x |x |x |x |x | x | x | x | x |
|Row 1, |Row 1, | | | | | | | | | | | | | | |
|Column 1|Column 2| | | | | | | | | | | | | | |
| +--------+--+--+--+--+--+--+--+--+--+--+----+----+----+----+
| |Minor |x |x |x |x |x |x |x |x |x |x | x | x | x | x |
| |Row 2, | | | | | | | | | | | | | | |
| |Column 2| | | | | | | | | | | | | | |
+--------+--------+--+--+--+--+--+--+--+--+--+--+----+----+----+----+
+=============+=============+=================+=====+=======+=========+=========+
| Column | Column |Column Title 3 |TC 4 |TC 5 | TC 6 | TC 7 |
| Title 1 | Tilte 2 +==+==+==+==+==+==+==+==+==+====+====+====+====+====+
| | |C1|C2|C3|C4|C5|C6|C1|C2|C1| C2 | C1 | C2 | C1 | C2 |
+=============+=============+==+==+==+==+==+==+==+==+==+====+====+====+====+====+
| Major Row | Minor Row |x |x |x |x |x |x |x |x |x | x | x | x | x | x |
| 1, Column 1 | 1, Column 2 | | | | | | | | | | | | | | |
| +-------------+--+--+--+--+--+--+--+--+--+----+----+----+----+----+
| | Minor Row |x |x |x |x |x |x |x |x |x | x | x | x | x | x |
| | 2, Column 2 | | | | | | | | | | | | | | |
+-------------+-------------+--+--+--+--+--+--+--+--+--+----+----+----+----+----+

Table 2: Large colspan

Expand Down Expand Up @@ -669,35 +665,40 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018







Author, et al. Expires 13 January 2019 [Page 12]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


+======+===========+======+========+=================+======+=======+
|Method|Definition |ptype |property|Value |Status|Version|
+======+===========+======+========+=================+======+=======+
|dnswl |RFC 8904 |dns |zone |DNSWL publicly |active|1 |
| | | | |accessible query | | |
| | | | |root domain | | |
+------+-----------+------+--------+-----------------+------+-------+
|dnswl |RFC 8904 |policy|ip |type A response |active|1 |
| | | | |received (or a | | |
| | | | |quoted, comma- | | |
| | | | |separated list | | |
| | | | |thereof) | | |
+------+-----------+------+--------+-----------------+------+-------+
|dnswl |RFC 8904 |policy|txt |type TXT query |active|1 |
| | | | |response | | |
+------+-----------+------+--------+-----------------+------+-------+
|dnswl |RFC 8904 |dns |sec |one of "yes" for |active|1 |
| | | | |DNSSEC | | |
| | | | |authenticated | | |
| | | | |data, "no" for | | |
| | | | |not signed, or | | |
| | | | |"na" for not | | |
| | | | |applicable | | |
+------+-----------+------+--------+-----------------+------+-------+
+======+============+======+=========+====================+======+=======+
|Method| Definition |ptype |property | Value |Status|Version|
+======+============+======+=========+====================+======+=======+
|dnswl | RFC 8904 |dns |zone | DNSWL publicly |active|1 |
| | | | | accessible | | |
| | | | | query root | | |
| | | | | domain | | |
+------+------------+------+---------+--------------------+------+-------+
|dnswl | RFC 8904 |policy|ip | type A response |active|1 |
| | | | | received (or a | | |
| | | | | quoted, comma- | | |
| | | | | separated list | | |
| | | | | thereof) | | |
+------+------------+------+---------+--------------------+------+-------+
|dnswl | RFC 8904 |policy|txt | type TXT query |active|1 |
| | | | | response | | |
+------+------------+------+---------+--------------------+------+-------+
|dnswl | RFC 8904 |dns |sec | one of "yes" |active|1 |
| | | | | for DNSSEC | | |
| | | | | authenticated | | |
| | | | | data, "no" for | | |
| | | | | not signed, or | | |
| | | | | "na" for not | | |
| | | | | applicable | | |
+------+------------+------+---------+--------------------+------+-------+

Table 6

Expand All @@ -724,7 +725,6 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018




Author, et al. Expires 13 January 2019 [Page 13]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
Expand Down Expand Up @@ -1178,25 +1178,23 @@ Author, et al. Expires 13 January 2019 [Page 21]
Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018


+=====+=====+===================+====================+
| SPI | SI | Next Hop(s) | Transport |
| | | | Encapsulation (TE) |
+=====+=====+===================+====================+
| 10 | 255 | 192.0.2.1 | VXLAN-gpe |
+-----+-----+-------------------+--------------------+
| 10 | 254 | 198.51.100.10 | GRE |
+-----+-----+-------------------+--------------------+
| 10 | 253 | www.example.com | HTTP |
+-----+-----+-------------------+--------------------+
| 10 | 252 | www.example2.com | HTTP |
+-----+-----+-------------------+--------------------+
| 40 | 251 | 198.51.100.15 | GRE |
+-----+-----+-------------------+--------------------+
| 50 | 200 | 01:23:45:67:89:ab | Ethernet |
+-----+-----+-------------------+--------------------+
| 15 | 212 | Null (end of | None |
| | | path) | |
+-----+-----+-------------------+--------------------+
+=====+=====+====================+==============================+
| SPI | SI | Next Hop(s) | Transport Encapsulation (TE) |
+=====+=====+====================+==============================+
| 10 | 255 | 192.0.2.1 | VXLAN-gpe |
+-----+-----+--------------------+------------------------------+
| 10 | 254 | 198.51.100.10 | GRE |
+-----+-----+--------------------+------------------------------+
| 10 | 253 | www.example.com | HTTP |
+-----+-----+--------------------+------------------------------+
| 10 | 252 | www.example2.com | HTTP |
+-----+-----+--------------------+------------------------------+
| 40 | 251 | 198.51.100.15 | GRE |
+-----+-----+--------------------+------------------------------+
| 50 | 200 | 01:23:45:67:89:ab | Ethernet |
+-----+-----+--------------------+------------------------------+
| 15 | 212 | Null (end of path) | None |
+-----+-----+--------------------+------------------------------+

Table 7: nNLM at nSFF1

Expand Down Expand Up @@ -1229,6 +1227,8 @@ Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018





Author, et al. Expires 13 January 2019 [Page 22]

Internet-Draft Xml2rfc Vocabulary V3 Elements July 2018
Expand Down
Loading

0 comments on commit 7cb0494

Please sign in to comment.