Skip to content

Commit 5cde4d2

Browse files
committed
(#817) remove orgmode characters instead of escaping them
1 parent 80f5902 commit 5cde4d2

File tree

2 files changed

+2
-7
lines changed

2 files changed

+2
-7
lines changed

src/OrgMode.hs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,4 @@ renderTable header rows =
1717
renderRow columns =
1818
"|" <> T.concat (intersperse "|" $ map escapeColumn columns) <> "|"
1919
escapeColumn :: T.Text -> T.Text
20-
escapeColumn =
21-
T.concatMap
22-
(\x ->
23-
if x `elem` charEscapeList
24-
then T.pack ['\\', x]
25-
else T.singleton x)
20+
escapeColumn = T.filter $ not . (`elem` charEscapeList)

test/OrgModeTest.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ spec =
1818
\|1|||\n\
1919
\||||\n\
2020
\|1|2|3|\n\
21-
\|\\|~|||\n") $
21+
\|~|||\n") $
2222
renderTable
2323
["hello", "world", "foo"]
2424
[ ["1", "2", "3"]

0 commit comments

Comments
 (0)