thephpleague / commonmark

Highly-extensible PHP Markdown parser which fully supports the CommonMark and GFM specs.
https://commonmark.thephpleague.com
BSD 3-Clause "New" or "Revised" License
2.75k stars 194 forks source link

lineStart in Table Extension does not yield the correct line #1037

Closed bwl21 closed 4 months ago

bwl21 commented 4 months ago

Version(s) affected

"2.4.2"

Description

Using the Table extension, the Table node does not report the correct startLine.

How to reproduce


## Tabelle

| Datum | Programm | Ort |
| --- | --- | --- |
| 22. Mai | Anreise | Eichberg |
| 23. Mai | Programm | Eichberg |
| 24. Mai | Programm | Eichberg |
| 25. Mai | Programm | Eichberg |

startLine should be 4 but is 5 endLine should be 9 it is 9

Node after parsing is:

2024-07-23 at 14 59 20_CleanShot_IntelliJ IDEA@2x

Possible solution

As of now I work around it in my renderer by subtracting 1 from the start line

Additional context

No response

Did this project help you today? Did it make you happy in any way?

oh yes ! it is a great project which helps to get full control over the Markdown processing