From 26a44150494f3ec21ba62a34f030b6e1dbc6670b Mon Sep 17 00:00:00 2001 From: Rhiannon Morris Date: Tue, 26 Nov 2024 06:08:10 +0100 Subject: [PATCH] =?UTF-8?q?remove=20#=20from=20l=C3=A1ntas=20passages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- langfilter/Glosses.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/langfilter/Glosses.hs b/langfilter/Glosses.hs index 4890ebb..c2398aa 100644 --- a/langfilter/Glosses.hs +++ b/langfilter/Glosses.hs @@ -43,7 +43,8 @@ glossTable = \case make l b n s g t = do let ℓ = length $ splitInlines s let colspecs = replicate ℓ (AlignDefault, ColWidthDefault) - let l' = cell1 ℓ $ underlines l; b' = cell1 ℓ <$> b; n' = cell1 ℓ <$> n + let l' = cell1 ℓ $ underlines $ noHash l + b' = cell1 ℓ <$> b; n' = cell1 ℓ <$> n let ss = cells s; gs = cells g; t' = cell1 ℓ t img <- case ?lang of Just Lántas -> @@ -85,3 +86,8 @@ underlines = concatMap underlineStr . takeWhile (/= Str "|") where underlineStr = \case Str txt -> Spans.underlines txt i -> [i] + +noHash :: [Inline] -> [Inline] +noHash = walk \case + Str str -> Str $ Text.filter (/= '#') str + i -> i