Pandoc.jl

Pandoc Interface and Types in Julia
Author kdheepak
Popularity
5 Stars
Updated Last
11 Months Ago
Started In
July 2019

Pandoc.jl

Status Documentation

Pandoc.jl is a package to make it easier to write filters for Pandoc in Julia.

Install

To install Pandoc.jl, open the Julia package manager prompt and type:

(v1.8) pkg> add Pandoc

Quick Start

julia> using Pandoc

Converter

julia> run(Pandoc.Converter(input = raw"""
# This is a header

This is a paragraph.
""")) |> println
<h1 id="this-is-a-header">This is a header</h1>
<p>This is a paragraph.</p>

Filter

julia> doc = Pandoc.Document(raw"""
# This is a header

This is a paragraph.
""")

julia> for block in doc.blocks
         if block isa Pandoc.Header
           block.level += 1
         end
       end

julia> run(Pandoc.Converter(input = doc, to="markdown")) |> println
## This is a header

This is a paragraph.

Used By Packages