xoofx / xoofx/markdig

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

Open
#704 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

question
Dominant language
C#
Stars
5.3k
Forks
510
Avg merge
8d 5h
Merged PRs (30d)
5

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the GridTable parser and reproduce the issue using the Markdown table shown in the report. The fix is complete when a space in a table border no longer creates an inserted horizontal rule and the second row renders as normal table content without changing the expected rowspan output.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.