mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-25 14:17:41 +00:00
Massive code cleanup
This commit doesn't changes anything substantial in the code, but reorganizes it in foldable units (we use folding.el) and fixes its markup for literate code documentation using our own fork of shocco.
This commit is contained in:
parent
8a21eb6145
commit
671350585e
@ -1,3 +1,3 @@
|
||||
all:
|
||||
./shocco ../../tomb > tomb.html
|
||||
./shocco ../../tomb > index.html
|
||||
pygmentize -S default -f html > style.css
|
||||
|
@ -70,7 +70,7 @@ file="$1"
|
||||
|
||||
# These are replaced with the full paths to real utilities by the
|
||||
# configure/make system.
|
||||
MARKDOWN='/usr/local/bin/markdown'
|
||||
MARKDOWN='/usr/bin/markdown_py'
|
||||
PYGMENTIZE='/usr/bin/pygmentize'
|
||||
|
||||
# On GNU systems, csplit doesn't elide empty files by default:
|
||||
@ -149,7 +149,12 @@ trap "rm -rf $WORK" 0
|
||||
# Get a pipeline going with the `<source>` data. We write a single blank
|
||||
# line at the end of the file to make sure we have an equal number of code/comment
|
||||
# pairs.
|
||||
(cat "$file" && printf "\n\n# \n\n") |
|
||||
|
||||
# Folding.el support: turn {{{ folds }}} into titles -jrml
|
||||
(cat "$file" \
|
||||
| sed -e 's/^# {{{/# #/' -e 's/^# }}}.*/# --------------/' \
|
||||
| awk '/\(\) {$/ { print "# ### " $1 } {print $0}' \
|
||||
&& printf "\n\n# \n\n") |
|
||||
|
||||
# We want the shebang line and any code preceding the first comment to
|
||||
# appear as the first code block. This inverts the normal flow of things.
|
||||
|
Loading…
Reference in New Issue
Block a user