reflex-dom-pandoc 0.4.0.0 → 0.6.0.0
raw patch · 3 files changed
+15/−4 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +4/−0
- reflex-dom-pandoc.cabal +1/−1
- src/Reflex/Dom/Pandoc/Footnotes.hs +10/−3
CHANGELOG.md view
@@ -1,5 +1,9 @@ # Change Log for reflex-dom-pandoc +## 0.6.0.0++- Hide footnote references from search engine results (#10)+ ## 0.4.0.0 - Fix task list checkbox styling margins by using Semantic UI checkbox.
reflex-dom-pandoc.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: reflex-dom-pandoc-version: 0.4.0.0+version: 0.6.0.0 synopsis: Render Pandoc documents to HTML using reflex-dom description: Please see the README on GitHub at <https://github.com/srid/reflex-dom-pandoc> homepage: https://github.com/srid/reflex-dom-pandoc#readme
src/Reflex/Dom/Pandoc/Footnotes.hs view
@@ -8,6 +8,7 @@ import Control.Monad.Reader import Data.List (nub, sortOn) import Data.Map (Map)+import Data.Text (Text) import qualified Data.Map as Map import qualified Data.Text as T import Reflex.Dom.Core hiding (Link, Space)@@ -57,9 +58,15 @@ renderFootnoteRef :: DomBuilder t m => Int -> m () renderFootnoteRef idx = do- elClass "sup" "footnote-ref" $ do- elAttr "a" ("id" =: ("fnref" <> T.pack (show idx)) <> "href" =: ("#fn" <> T.pack (show idx))) $ do- text $ T.pack $ show idx+ elNoSnippetSpan Map.empty $ do+ elClass "sup" "footnote-ref" $ do+ elAttr "a" ("id" =: ("fnref" <> T.pack (show idx)) <> "href" =: ("#fn" <> T.pack (show idx))) $ do+ text $ T.pack $ show idx+ where+ -- Prevent this element from appearing in Google search results+ -- https://developers.google.com/search/reference/robots_meta_tag#data-nosnippet-attr+ elNoSnippetSpan :: DomBuilder t m => Map Text Text -> m () -> m ()+ elNoSnippetSpan attrs = elAttr "span" ("data-nosnippet" =: "" <> attrs) sansFootnotes :: DomBuilder t m => ReaderT Footnotes m a -> m a sansFootnotes = flip runReaderT mempty