diff --git a/scripts/knk2html b/scripts/knk2html index fa948ef..d704af6 100755 --- a/scripts/knk2html +++ b/scripts/knk2html @@ -11,8 +11,7 @@ from="$1" to="$2" vim -RE +'let g:html_dynamic_folds=1' +TOhtml +"w! $to" +'qa!' "$from" sed -i -r \ - -e $'/id=\'fold2\'.*Aliases for Primitives/! s!class=\'closed-fold\'!class=\'open-fold\'!' \ - -e 's!.*DOCTYPE.*!<\!DOCTYPE html>!' \ + -e $'/id=\'fold1\'.*Aliases for Primitives/! s!class=\'closed-fold\'!class=\'open-fold\'!' \ -e '/^body/ s!\}!text-align: center; }!' \ -e '/^pre/ s!\}!text-align: left; display: inline-block; width: max-content; }!' \ -e 's!.*.*!<title>'"$(basename "$from")"'!' \