summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg42.2a@gmail.com>2014-06-04 23:16:49 +0200
committerPhilipp Gesang <phg42.2a@gmail.com>2014-06-04 23:16:49 +0200
commit458e2556a1ea7426735486be11523cba8dff177d (patch)
treef55aca0744001d436d67813bbecb0a4aed947344
parent50e033bd254a087fccbe1a0bcaef208f5e106b2a (diff)
downloadluaotfload-458e2556a1ea7426735486be11523cba8dff177d.tar.gz
doc: fix indentation in listings
-rw-r--r--doc/luaotfload-latex.tex5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/luaotfload-latex.tex b/doc/luaotfload-latex.tex
index 3aab22b..34c494d 100644
--- a/doc/luaotfload-latex.tex
+++ b/doc/luaotfload-latex.tex
@@ -244,9 +244,14 @@
\directlua {
local texprint = tex.print
+ local stringsub = string.sub
+ local backslash = string.byte (0x5c)
document = document or { }
document.printlines = function (buffer)
for _, line in next, string.explode (buffer, "\noexpand\n") do
+ if stringsub (line, 1, 1) == " " then
+ line = backslash .. line
+ end
texprint (-1, line)
texprint (-1, "")
end