Skip to content
1 change: 1 addition & 0 deletions emanote/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
- Enable auto identifier for org files ([\#502](https://github.com/srid/emanote/pull/502))
- Bug fixes:
- Emanote no longer crashes when run on an empty directory ([\#487](https://github.com/srid/emanote/issues/487))
- Remove footnotes from `og:description` ([\#529](https://github.com/srid/emanote/pull/529))
- Stork search fixes
- Fix empty stork index generation when using more than 1 layer ([\#493](https://github.com/srid/emanote/issues/493))
- Stork search index is now uses note path from their associated layer ([\#495](https://github.com/srid/emanote/pull/495))
Expand Down
2 changes: 1 addition & 1 deletion emanote/emanote.cabal
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
cabal-version: 2.4
name: emanote
version: 1.3.16.0
version: 1.3.17.0
license: AGPL-3.0-only
copyright: 2022 Sridhar Ratnakumar
maintainer: srid@srid.ca
Expand Down
8 changes: 7 additions & 1 deletion emanote/src/Emanote/Model/Note.hs
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ applyNoteMetaFilters doc =
)
addDescriptionFromBody =
overrideAesonText ("page" :| ["description"]) $ \case
B.Para is -> [WL.plainify is]
B.Para is -> [WL.plainify (mapMaybe removeInlineNotes is)]
_ -> mempty
-- FIXME this doesn't take splice rendering into account. Specifically,
-- `![[foo.jpeg]]` is not handled at all.
Expand All @@ -406,4 +406,10 @@ applyNoteMetaFilters doc =
pure $ SData.oneAesonText (toList key) val
)

-- TODO: apply this recursively
removeInlineNotes :: B.Inline -> Maybe B.Inline
removeInlineNotes = \case
B.Note{} -> Nothing
a -> Just a

makeLenses ''Note