diff --git a/docs/guide/folgezettel.md b/docs/guide/folgezettel.md index aa8f89352..fa37b6b07 100644 --- a/docs/guide/folgezettel.md +++ b/docs/guide/folgezettel.md @@ -21,7 +21,7 @@ Here is the [[target-note]]# ``` {#folder} -## Folder notes +## [[folder-note|Folder notes]] By default, Emanote includes any directories in your note's path as vertices in the folgezettel graph. This makes the [[folder-note|folder note]] a folgezettel parent of the child note. The contents of a folder, likewise, become folgezetten children of the [[folder-note|folder note]]. For eg., in `foo/bar/qux.md`, "foo" is a folgezettel parent of "bar", and "bar" is a folgezettel parent of "qux". diff --git a/emanote/emanote.cabal b/emanote/emanote.cabal index 3b2634764..a393ec1e2 100644 --- a/emanote/emanote.cabal +++ b/emanote/emanote.cabal @@ -1,6 +1,6 @@ cabal-version: 2.4 name: emanote -version: 1.3.14.2 +version: 1.3.14.3 license: AGPL-3.0-only copyright: 2022 Sridhar Ratnakumar maintainer: srid@srid.ca diff --git a/emanote/src/Emanote/Model/Toc.hs b/emanote/src/Emanote/Model/Toc.hs index 18de92aa5..5f779afe9 100644 --- a/emanote/src/Emanote/Model/Toc.hs +++ b/emanote/src/Emanote/Model/Toc.hs @@ -1,5 +1,6 @@ module Emanote.Model.Toc where +import Commonmark.Extensions.WikiLink qualified as WL import Data.Map.Syntax ((##)) import Data.Tree (Tree (Node)) import Data.Tree qualified as Tree @@ -9,7 +10,6 @@ import Heist.Extra.Splices.Pandoc (RenderCtx (rootNode)) import Heist.Interpreted qualified as HI import Relude import Text.Pandoc -import Text.Pandoc.Shared (stringify) import Text.XmlHtml qualified as X type Toc = Tree.Forest DocHeading @@ -25,7 +25,7 @@ pandocToHeadings :: Pandoc -> [(Int, DocHeading)] pandocToHeadings (Pandoc _ blocks) = mapMaybe toHeading blocks where toHeading block = case block of - Header hlvl (oid, _, _) inlines -> Just (hlvl, DocHeading oid (stringify inlines)) + Header hlvl (oid, _, _) inlines -> Just (hlvl, DocHeading oid (WL.plainify inlines)) _ -> Nothing -- | Create the Toc