Commonmark.Extensions.Wikilinks

commonmark-extensions-0.2.3.3: Pure Haskell commonmark parser.

Safe Haskell | Safe-Inferred
Language | Haskell2010

Commonmark.Extensions.Wikilinks

Synopsis

- wikilinksSpec :: (Monad m, IsInline il, HasWikilinks il) => TitlePosition -> SyntaxSpec m il bl
- data TitlePosition
  - = TitleBeforePipe
  - | TitleAfterPipe
- class HasWikilinks il where
  - wikilink :: Text -> il -> il

# Documentation

wikilinksSpec :: (Monad m, IsInline il, HasWikilinks il) => TitlePosition -> SyntaxSpec m il bl #

data TitlePosition #

Determines whether `[[foo|bar]]` is a link to page `bar` with title (description) `foo` (`TitleBeforePipe`), as in GitHub wikis, or a link to page `foo` with title `bar` (`TitleAfterPipe`), as in Obsidian and Foam.

Constructors

TitleBeforePipe |
TitleAfterPipe |

#### Instances

Instances details

Show TitlePosition # |
Instance details Defined in Commonmark.Extensions.Wikilinks Methods showsPrec :: Int -> TitlePosition -> ShowS show :: TitlePosition -> String showList :: [TitlePosition] -> ShowS
Eq TitlePosition # |
Instance details Defined in Commonmark.Extensions.Wikilinks Methods (==) :: TitlePosition -> TitlePosition -> Bool (/=) :: TitlePosition -> TitlePosition -> Bool

class HasWikilinks il where #

Methods

wikilink :: Text -> il -> il #

#### Instances

Instances details

Rangeable (Html a) => HasWikilinks (Html a) # |
Instance details Defined in Commonmark.Extensions.Wikilinks Methods wikilink :: Text -> Html a -> Html a #
(HasWikilinks il, Semigroup il, Monoid il) => HasWikilinks (WithSourceMap il) # |
Instance details Defined in Commonmark.Extensions.Wikilinks Methods wikilink :: Text -> WithSourceMap il -> WithSourceMap il #