diff options
Diffstat (limited to 'src/Zettel/Transclusion.hs')
-rw-r--r-- | src/Zettel/Transclusion.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Zettel/Transclusion.hs b/src/Zettel/Transclusion.hs index 617a475..63e1271 100644 --- a/src/Zettel/Transclusion.hs +++ b/src/Zettel/Transclusion.hs @@ -9,6 +9,10 @@ import Text.Pandoc.Walk (walk, query) import Zettel.Common import Zettel.Types +between :: Char -> Char -> Text -> Text +between c1 c2 t = + T.drop 1 . T.takeWhile (c2 /=) $ T.dropWhile (c1 /=) t + attrValue :: Text -> Text -> Maybe Text attrValue t v = viaNonEmpty head . drop 1 . dropWhile (/= v) $ T.words t |