:Thoughts markdown header level sectioning increase

Thoughts are intended to be simple, and h2 is currently used for the date
master
Mike Gerwitz 2015-05-22 01:37:05 -04:00
parent 6527ab6998
commit 32d4c11d98
No known key found for this signature in database
GPG Key ID: F22BB8158EE30EAB
2 changed files with 6 additions and 5 deletions

View File

@ -20,11 +20,13 @@
##
declare to=html5
declare -i hlevel=1
while getopts nP opt; do
while getopts nPh: opt; do
case "$opt" in
n|P) to=plain;;
h) hlevel="$OPTARG";;
esac
done
exec pandoc -S -fmarkdown -t"$to"
exec pandoc -S -fmarkdown -t"$to" --base-header-level=$hlevel

View File

@ -29,8 +29,7 @@ declare -a all_args="$@"
while getopts nP opt; do
case "$opt" in
n) ;;
P) ;;
n|P) ;;
esac
done
@ -51,4 +50,4 @@ test "$timestamp" -gt "$md_cutoff" \
|| fmt-old
# it's just that simple.
exec "$(dirname "$0" )"/mdfmt "${all_args[@]}"
exec "$(dirname "$0" )"/mdfmt -h2 "${all_args[@]}"