https://bugzilla.wikimedia.org/show_bug.cgi?id=49942

James Forrester <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://hu.wikipedia.org/wi
                   |                            |ki/Vall%C3%A1s?oldid=136963
                   |                            |07
                 CC|                            |[email protected]
          Component|General                     |JS/General
           Assignee|[email protected]    |[email protected]
            Product|VisualEditor                |Parsoid
            Summary|Tables in image captions    |Parsoid eats wikitext
                   |get lost                    |tables inside image
                   |                            |captions

--- Comment #1 from James Forrester <[email protected]> ---
Horrible, relatively-rare case for Parsoid, is the use of wikitext tables
inside image captions. Currently, the following wikitext:

[Start]
[[Image:Foo.jpg|thumb|200px|This is an example image thumbnail caption with a
table

{|
! Foo !! Bar
|-
| Foo1 || Bar1
|-
| Foo2 || Bar2
|}

… and some more text.]]
[End]

… turns into the following output from Parsoid:

[Start]
<figure typeof="mw:Image/Thumb" data-parsoid="…">
  <a href="./File:Foo.jpg" data-parsoid="…">
    <img resource="./File:Foo.jpg"
src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Foo.jpg/200px-Foo.jpg";
      height="131" width="200" data-parsoid="…">
  </a>
  <figcaption class="mw-figcaption" data-parsoid="…">}

… and some more text.
  </figcaption>
</figure>
[End]

… whereas nominally it should be (generated using an HTML table rather than a
wikitext one, which seems to work fine without DOM diffs from VE end):

[Start]
<figure typeof="mw:Image/Thumb" data-parsoid="…">
  <a href="./File:Foo.jpg" data-parsoid="…">
    <img resource="./File:Foo.jpg"
src="http://upload.wikimedia.org/wikipedia/commons/thumb/0/06/Foo.jpg/200px-Foo.jpg";
      height="131" width="200" data-parsoid="…">
  </a>
  <figcaption class="mw-figcaption" data-parsoid="…">This is an example image
thumbnail caption with a table

    <table data-parsoid="…">
      <tbody data-parsoid="…">
        <tr data-parsoid="…">
          <th data-parsoid="…">Foo</th>
           <th data-parsoid="…">Bar</th>
        </tr>
        <tr data-parsoid="…">
          <td data-parsoid="…">Foo1</td>
          <td data-parsoid="…">Bar1</td>
        </tr>
        <tr data-parsoid="…">
          <td data-parsoid="…">Foo2</td>
          <td data-parsoid="…">Bar2</td>
        </tr>
      </tbody>
    </table>

… and some more text.
  </figcaption>
</figure>
[End]

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to