Commit Graph

6 Commits

Author SHA1 Message Date
Selase Krakani 850e31c83d
FIX: Remove linebreaks from cell data (#48)
Pasting text with linebreaks into the table UI results in incorrectly
generated table markdown.

This fix strips linebreaks from text during table markdown generation.
2023-02-27 15:49:55 +00:00
Penar Musaraj b45ffe48b7
FIX: Allow headings to have the same label (#46)
Fixes an issue where multiple headings with the same value would remove
columns from displaying.
2023-02-16 21:16:48 -05:00
Penar Musaraj fdc79d0cbf
FIX: do not edit wrong table when post has uploads (#37)
Previously, the regex was catching uploads as well as tables.

This change ensures only strict tables are matched by requiring that
matches start with the pipe character.

Also adds a unit test for `findTableRegex` to describe the expected
behaviour of the helper.
2023-01-04 08:06:25 +01:00
Keegan George 7b37c6acc1
FIX: Special character alignment issue (#10)
* DEV: Use alternate fork of `array-to-table`

* DEV: Add unit test for `arrayToTable()` method

* Move `arrayToTable` so it is available for unit tests

* DEV: Add assertion for creating a markdown table with special chars

When a table with special characters (such as `$`) is inserted in a cell to the right of a blank cell. The alignment of the table gets ruined if the table doesn't have surrounding pipes. This check ensures this alignment is correct.

Co-authored-by: Penar Musaraj <pmusaraj@gmail.com>
2022-08-11 11:33:34 -07:00
Keegan George 8e078d2bc9 DEV: Update tests 2022-07-20 11:18:25 -07:00
Keegan George 34d1327951 DEV: Add acceptance tests 2022-07-04 18:03:43 -07:00