commonmark-extensions-0.2.7: Pure Haskell commonmark parser.

Safe Haskell | None
Language | Haskell2010

Commonmark.Extensions.Wikilinks

Synopsis

- wikilinksSpec :: forall (m :: Type -> Type) il bl. (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 :: forall (m :: Type -> Type) il bl. (Monad m, IsInline il, HasWikilinks il) => TitlePosition -> SyntaxSpec m il bl Source #

data TitlePosition Source #

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

class HasWikilinks il where Source #

Methods

wikilink :: Text -> il -> il Source #

#### Instances

Instances details

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