mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 11:08:13 +08:00
9449df56af
The website contains documentations. Merging these two repos makes them more discoverable, and encourages updating the code and doc at the same time.
22 lines
331 B
Bash
Executable File
22 lines
331 B
Bash
Executable File
#!/bin/sh
|
|
in=$1
|
|
out=$2
|
|
opts=
|
|
|
|
has() {
|
|
head -n1 $in | grep "$@" >/dev/null
|
|
}
|
|
|
|
has toc && {
|
|
opts="$opts --toc --template=toc-and-body"
|
|
}
|
|
has number-sections && {
|
|
opts="$opts --number-sections"
|
|
}
|
|
|
|
mydir=$(dirname "$0")
|
|
|
|
$mydir/highlighter < $1 |
|
|
$mydir/macros |
|
|
pandoc -f gfm --data-dir=$mydir/pandoc-data -o $2 $opts
|