summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2014-03-02 17:50:43 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2018-12-02 21:09:43 +0100
commit78b07d663d694e8081cf6167e5a84a1d5293d233 (patch)
tree679bfacde892b4d3f921c72269d49d9269b2ea02
parentb53f1b8abb4121cd87d88619e055175ce6cc3b7e (diff)
downloadcontext-rst-78b07d663d694e8081cf6167e5a84a1d5293d233.tar.gz
use --debug flag when running TeX
-rw-r--r--doc/manual.tex9
-rw-r--r--src/rst_parser.lua16
2 files changed, 16 insertions, 9 deletions
diff --git a/doc/manual.tex b/doc/manual.tex
index 04142de..6e30789 100644
--- a/doc/manual.tex
+++ b/doc/manual.tex
@@ -53,10 +53,13 @@
\vfill
\framed [align=right,frame=off,topframe=on] {%
\tfxx\ss\setupinterlinespace[small]\noindentation
-Copyright 2010--2014 Philipp Gesang, Radebeul.\par
+Copyright 2010--2014 Philipp Gesang, Tübingen.\par
Mail any bug reports, patches or suggestions to\par
-\type{string.format("%s@%s.com", "phg42.2a", "gmail")}\par
-or pay a visit to \goto{my BitBucket home}[url(http://bitbucket.org/phg/)].\par
+\type{string.format("%s@%s.com", "phg42.2a", "gmail")}.\par
+Alternatively, pay a visit
+to \goto{my BitBucket handle}[url(http://bitbucket.org/phg/)]
+or \goto{my home page}[url(https://phi-gamma.net/coding)]
+\par
}
\stopstandardmakeup
\stopbuffer
diff --git a/src/rst_parser.lua b/src/rst_parser.lua
index 1b0733d..96c14d4 100644
--- a/src/rst_parser.lua
+++ b/src/rst_parser.lua
@@ -27,13 +27,17 @@ local main = function ()
return -1
end
-if not (context or scripts) then
- return main()
-end
-
thirddata = thirddata or { }
thirddata.rst = { }
-thirddata.rst_helpers = { }
+thirddata.rst_helpers = { rst_debug = false }
+
+if context then
+ if environment.argument "debug" == true then
+ thirddata.rst_helpers.rst_debug = true
+ end
+elseif not scripts then
+ return main()
+end
environment.loadluafile"rst_helpers"
environment.loadluafile"rst_directives"
@@ -48,7 +52,6 @@ rst.strip_BOM = true
rst.expandtab = true
rst.shiftwidth = 4
rst.crlf = true
-helpers.rst_debug = false
local utf = unicode.utf8
@@ -1567,6 +1570,7 @@ local get_tmpfile = function (category)
)
end
+
function thirddata.rst.do_rst_file(fname)
local raw_data = load_file(fname)
local processed = lpegmatch (rst_parser, raw_data)