Skip to content

mediawiki lists in tables #2606

Open
stm2 opened this Issue · 2 comments

2 participants

@stm2

The mediawiki reader treats a * at the beginning of a cell as a list, but this should only be the case if the * is at the start of a line. For example this

pandoc -f mediawiki -t html << EOF
{|
| * hello
|}

produces

<table>
<tbody>
<tr class="odd">
<td align="left"><ul>
<li>hello</li>
</ul></td>
</tr>
</tbody>
</table>

when it should produce

<table>
<tbody>
<tr class="odd">
<td align="left"><p>hello</p></td></tr>
</tbody>
</table>

However,

{|
|
* hello
|}

should produce a list inside a table, but

{|
|
 * hello
|}

should not. See https://www.mediawiki.org/w/index.php?title=Help:Lists for examples.

@jgm jgm added the bug label
@jgm jgm added a commit that closed this issue
@jgm MediaWiki writer: fix spacing issues.
+ Start cell on new line unless it's a single Para or Plain.
+ For single Para or Plain, insert a space after the `|` to
  avoid problems when the text begins with a character like
  `-`.

Closes #2604, closes #2606.
a68e072
@jgm jgm closed this in a68e072
@stm2

This is still an issue in 1.16.

It concerns the mediawiki reader.

@jgm
Owner

Sorry, it was closed in error.

@jgm jgm reopened this
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm MediaWiki writer: fix spacing issues.
+ Start cell on new line unless it's a single Para or Plain.
+ For single Para or Plain, insert a space after the `|` to
  avoid problems when the text begins with a character like
  `-`.

Closes #2604, closes #2606.
58f9fe8
@c-forster c-forster pushed a commit to c-forster/pandoc that referenced this issue
@jgm MediaWiki writer: fix spacing issues.
+ Start cell on new line unless it's a single Para or Plain.
+ For single Para or Plain, insert a space after the `|` to
  avoid problems when the text begins with a character like
  `-`.

Closes #2604, closes #2606.
7b42c0d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.