-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(table): table alignment wasn't reset properly (#218)
* fix(table): table alignment wasn't reset properly * test(table): added tests on table alignment
- Loading branch information
1 parent
46caaa3
commit 5c4827e
Showing
3 changed files
with
143 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
132 changes: 132 additions & 0 deletions
132
src/interpreter/snapshots/inlyne__interpreter__tests__aligned_table.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,132 @@ | ||
--- | ||
source: src/interpreter/tests.rs | ||
description: " --- md\n\n| left default | left forced | centered | right | left default |\n| ------------ | :---------- | :------: | ----: | ------------ |\n| text | text | text | text | text |\n\n\n --- html\n\n<table>\n<thead>\n<tr>\n<th>left default</th>\n<th align=\"left\">left forced</th>\n<th align=\"center\">centered</th>\n<th align=\"right\">right</th>\n<th>left default</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>text</td>\n<td align=\"left\">text</td>\n<td align=\"center\">text</td>\n<td align=\"right\">text</td>\n<td>text</td>\n</tr>\n</tbody>\n</table>\n" | ||
expression: interpret_md(text) | ||
--- | ||
[ | ||
Spacer( | ||
InvisibleSpacer(5), | ||
), | ||
Table( | ||
Table { | ||
headers: [ | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "left default", | ||
default_color: Color(BLACK), | ||
style: BOLD , | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "left forced", | ||
default_color: Color(BLACK), | ||
style: BOLD , | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
align: Center, | ||
texts: [ | ||
Text { | ||
text: "centered", | ||
default_color: Color(BLACK), | ||
style: BOLD , | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
align: Right, | ||
texts: [ | ||
Text { | ||
text: "right", | ||
default_color: Color(BLACK), | ||
style: BOLD , | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "left default", | ||
default_color: Color(BLACK), | ||
style: BOLD , | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
], | ||
rows: [ | ||
[ | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "text", | ||
default_color: Color(BLACK), | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "text", | ||
default_color: Color(BLACK), | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
align: Center, | ||
texts: [ | ||
Text { | ||
text: "text", | ||
default_color: Color(BLACK), | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
align: Right, | ||
texts: [ | ||
Text { | ||
text: "text", | ||
default_color: Color(BLACK), | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
TextBox { | ||
texts: [ | ||
Text { | ||
text: "text", | ||
default_color: Color(BLACK), | ||
.. | ||
}, | ||
], | ||
.. | ||
}, | ||
], | ||
], | ||
}, | ||
), | ||
Spacer( | ||
InvisibleSpacer(5), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters