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

GridTable Parser - wrong behavior if with space occurs in table borders #704

Open
RedCali opened this issue Feb 28, 2023 · 3 comments
Open
Labels

Comments

@RedCali
Copy link

RedCali commented Feb 28, 2023

GridTable Parser - wrong behavior if with space occurs in table borders
Th with space leads into an inserted horizontal row:

Source:

#### Rendering Issue WithSpace
+ :-----: +--------------------+---------------------+
| No.     | component          | comp. no.           
+=========+====================+=====================+
| 1       | component 1        | xxxx-xxxx-xxxx      
+ --------+--------------------+                     
| 2       | component 2        | xxxx-xxxx-xxxx   

Result:

<table>
<colgroup><col style="width:18%">
<col style="width:40%">
<col style="width:42%">
</colgroup>
<thead>
<tr>
<th style="text-align: center;">No.</th>
<th>component</th>
<th>comp. no.</th>
</tr>
</thead>
<tbody>
<tr>
<td style="text-align: center;">1</td>
<td>component 1</td>
<td rowspan="2">xxxx-xxxx-xxxx
xxxx-xxxx-xxxx</td>
</tr>
<tr>
<td style="text-align: center;">
<hr>
<p>2</p>
</td>
<td>component 2</td>
</tr>
</tbody>
</table>
```^

![image](https://user-images.githubusercontent.com/36916361/221905448-e39e813b-9054-4760-b539-46a209e6d79d.png)
@xoofx
Copy link
Owner

xoofx commented Mar 7, 2023

Could you elaborate which space exactly?

@xoofx xoofx added the question label Mar 7, 2023
@RedCali
Copy link
Author

RedCali commented Mar 7, 2023

Its the one between the two table lines 1 & 2 - the separator gets an whitespace after the + sign + --.... and the dashes after the with space interpreted as horizontal row.

Hard to say what's wrong or right here as the grid table has kind of hard def. and this will break it...
from user perspective it could be good if this signs could be ignored in the row separation started by +, but honestly I'm not sure which side effects will follow if this would be accepted

@xoofx
Copy link
Owner

xoofx commented Mar 7, 2023

Oh, ok, understood, thanks.

Let's say that it is by design and that it doesn't accept spaces between + 🙂

If you feel brave, PR welcome, the code is in GridTableParser.cs. As you said, there is no real standard for this. I haven't checked how e.g pandoc is behaving with such difference.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants