Make spaces visible using CSS.
Closes #49. I didn't want to actually insert the characters, since I want the code samples to be cut/pasteable. But this CSS trick seems to work.
This commit is contained in:
Родитель
535afc08fe
Коммит
faacf7065f
5
Makefile
5
Makefile
|
@ -37,9 +37,10 @@ spec.md: $(SPEC)
|
|||
|
||||
spec.html: spec.md template.html
|
||||
pandoc --no-highlight --number-sections --template template.html -s --toc -S $< | \
|
||||
perl -pe 's/a href="@([^"]*)"/a id="\1" href="#\1" class="definition"/g' > $@
|
||||
perl -pe 's/a href="@([^"]*)"/a id="\1" href="#\1" class="definition"/g' | \
|
||||
perl -pe 's/␣/<span class="space"> <\/span>/g' \
|
||||
> $@
|
||||
|
||||
# | perl -pe 's/␣/<span class="space"> <\/span>/g' > $@
|
||||
|
||||
spec.pdf: spec.md template.tex specfilter.hs
|
||||
pandoc -s $< --template template.tex \
|
||||
|
|
|
@ -29,7 +29,7 @@ while (<STDIN>) {
|
|||
$section = $match[0];
|
||||
}
|
||||
if ($stage != 0) {
|
||||
# $_ =~ s/ /␣/g;
|
||||
$_ =~ s/ /␣/g;
|
||||
}
|
||||
print $_;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче