hakyll-shortcut-links-0.1.0.1: Use shortcut-links in markdown file for Hakyll
Copyright(c) 2019-2021 Kowainik
LicenseMPL-2.0
MaintainerKowainik <xrom.xkov@gmail.com>
Safe HaskellNone
LanguageHaskell2010

Hakyll.ShortcutLinks.Parser

Description

This module implements parser of the shortcut links that are introduced in the [shortcut-links](https:/hackage.haskell.orgpackage/shortcut-links) package.

The markdown example of the shortcut link:

[This project](@github(Kowainik):hakyll-shortcut-links)

The implemented parser should parse the url part of the link. In this example the parsed links would look like this:

>>> parseShortcut "@github(Kowainik):hakyll-shortcut-links"
Right ("github", Just "Kowainik", Just "hakyll-shortcut-links")
Synopsis

Documentation

parseShortcut :: Text -> Either String (Text, Maybe Text, Maybe Text) Source #

Parses a shortcut link. Allowed formats:

@name
@name:text
@name(option)
@name(option):text