Commit a3617d6
committed
fix: indented tables and tables with no spaces in cells
## Details
Issue: #142
This resolves 2 separate issues.
The first is for tables that are indented some amount space over. In
such cases the top & bottom full sections as well as the delimitter
would be misaligned since they did not take into account any leading
spaces and generate full lines rather than changing individual parts
which is the case for rows. To fix this add logic to get the amount of
leading space and shift these components over accordingly.
The second is for tables where the contents of a cell went all the way
to the right pipe with no spaces. This would cause the padding to be
inserted in the middle of the content rather than at the end. To fix
this adjust the column associated with padding to no longer subtract one
off. Use a priority value of 0 for the padding marks so the pipe marks
pickup the padding as well, otherwise they would end up ignoring it.1 parent 0a8b941 commit a3617d6
File tree
6 files changed
+39
-20
lines changed- benches
- doc
- lua/render-markdown
- handler
- tests
6 files changed
+39
-20
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
| 14 | + | |
15 | 15 | | |
16 | 16 | | |
17 | 17 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
570 | 570 | | |
571 | 571 | | |
572 | 572 | | |
| 573 | + | |
573 | 574 | | |
574 | 575 | | |
575 | 576 | | |
| |||
588 | 589 | | |
589 | 590 | | |
590 | 591 | | |
591 | | - | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
592 | 600 | | |
593 | 601 | | |
594 | 602 | | |
595 | | - | |
| 603 | + | |
596 | 604 | | |
597 | 605 | | |
598 | 606 | | |
| |||
615 | 623 | | |
616 | 624 | | |
617 | 625 | | |
618 | | - | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
619 | 629 | | |
620 | 630 | | |
621 | 631 | | |
| |||
669 | 679 | | |
670 | 680 | | |
671 | 681 | | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
672 | 688 | | |
673 | 689 | | |
674 | 690 | | |
675 | 691 | | |
676 | 692 | | |
677 | 693 | | |
678 | 694 | | |
| 695 | + | |
| 696 | + | |
| 697 | + | |
| 698 | + | |
| 699 | + | |
679 | 700 | | |
680 | 701 | | |
681 | 702 | | |
682 | 703 | | |
683 | | - | |
684 | | - | |
685 | | - | |
| 704 | + | |
| 705 | + | |
686 | 706 | | |
687 | 707 | | |
688 | 708 | | |
689 | 709 | | |
690 | 710 | | |
691 | | - | |
692 | | - | |
693 | | - | |
| 711 | + | |
| 712 | + | |
694 | 713 | | |
695 | 714 | | |
696 | 715 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
59 | 58 | | |
60 | | - | |
| 59 | + | |
61 | 60 | | |
| 61 | + | |
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | | - | |
| 70 | + | |
72 | 71 | | |
| 72 | + | |
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | 81 | | |
| 82 | + | |
83 | 83 | | |
84 | 84 | | |
85 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | 17 | | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | 23 | | |
| 24 | + | |
25 | 25 | | |
26 | | - | |
27 | 26 | | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
0 commit comments