git.iko.soy/typeable/pandoc
on master help sign in
Use 'highlight' to produce syntax-highlighted versions of
06ff1fefiddlosopher
web/Makefile+4
@@ -12,6 +12,10 @@ clean:
12
12
13examples.txt : $(PANDOC_DEPS) mkdemos.pl config.xsl S5DEMO README
13examples.txt : $(PANDOC_DEPS) mkdemos.pl config.xsl S5DEMO README
14 PATH=$(PANDOC_PATH):$$PATH ./mkdemos.pl demos $@
14 PATH=$(PANDOC_PATH):$$PATH ./mkdemos.pl demos $@
15+ perl -pi -e 's!(href="(main|(my)?header|footer|example\d+)\.(html|tex|xml|css))"!\1.html"!g' $@
16+ for file in $$(ls | egrep '(main|(my)?header|footer|example[0-9]+)\.(html|tex|xml|css)$$'); \
17+ do highlight -u utf-8 --style emacs $$file > $$file.html; \
18+ done
15
19
16%.html : %.txt $(PANDOC_DEPS)
20%.html : %.txt $(PANDOC_DEPS)
17 $(MAKEPAGE) $< > $@
21 $(MAKEPAGE) $< > $@
web/mkdemos.pl+4
@@ -21,7 +21,11 @@ while (<IN>) {
21 $line =~ s/ ([A-Za-z0-9_:\/]+(\.|\/)[a-zA-Z0-9.\/]*|README|S5DEMO)/ <a href="$1">$1<\/a>/g;
21 $line =~ s/ ([A-Za-z0-9_:\/]+(\.|\/)[a-zA-Z0-9.\/]*|README|S5DEMO)/ <a href="$1">$1<\/a>/g;
22 $line =~ s/-/\\-/g;
22 $line =~ s/-/\\-/g;
23 $line =~ s/^(.*)$/ <code>$1<\/code>/g;
23 $line =~ s/^(.*)$/ <code>$1<\/code>/g;
24+ if ( $line =~ /(example\d+\.html)<\/a><\/code>/m ) {
25+ $line .= "\n (View [`$1` as a web page]($1).)\n";
26+ }
24 }
27 }
25 print OUT $line;
28 print OUT $line;
26
29
27}
30}
31+