Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Table layout when using empty cells and custom tags #233

Open
raducoravu opened this issue Dec 5, 2024 · 0 comments
Open

Table layout when using empty cells and custom tags #233

raducoravu opened this issue Dec 5, 2024 · 0 comments

Comments

@raducoravu
Copy link
Collaborator

I have this Markdown table:

| 11 | 22 | 33 | 44 |
|---|---|---|---|
| A1 || B1 | C1 |
| A2 | B2 | C2 | D2<type>E2 |
| A3 | B3 | C3 | D3 |

Rendered in GitHub it looks like this:

11 22 33 44
A1 B1 C1
A2 B2 C2 D2E2
A3 B3 C3 D3

Converted to a DITA topic it looks like this:

            <table>
                <tgroup cols="4">
                    <colspec colname="col1"/>
                    <colspec colname="col2"/>
                    <colspec colname="col3"/>
                    <colspec colname="col4"/>
                    <thead>
                        <row>
                            <entry>11</entry>
                            <entry>22</entry>
                            <entry>33</entry>
                            <entry>44</entry>
                        </row>
                    </thead>
                    <tbody>
                        <row>
                            <entry namest="col1" nameend="col2">A1</entry>
                            <entry>B1</entry>
                            <entry>C1</entry>
                        </row>
                        <row>
                            <entry>A2</entry>
                            <entry>B2</entry>
                            <entry>C2</entry>
                            <entry>D2<type>E2</type></entry>
                            <row>
                                <entry>A3</entry>
                                <entry>B3</entry>
                                <entry>C3</entry>
                                <entry>D3</entry>
                            </row>
                        </row>
                    </tbody>
                </tgroup>
            </table>

So what we notice in the converted DITA table:

  1. The cell "A1" spans over two columns when converted to DITA XML with this project. When rendered in GitHub, the cell does not span two columns.
  2. The fact there is that unescaped <type> content there breaks completely the layout of the last row which becomes engulfed inside the next to last row.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant