summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2011-05-05 12:07:11 +0200
committerPhilipp Gesang <pgesang@ix.urz.uni-heidelberg.de>2011-05-05 12:07:11 +0200
commit3f0ea559afbbfbe7c4642df946a2407800d29c68 (patch)
tree0cc302b1ef021a1050d8900a57b19fdfe1cd5e01
parentd275bb566ac22f1fee8b6a566a0b5bd47cecdd56 (diff)
downloadcontext-rst-3f0ea559afbbfbe7c4642df946a2407800d29c68.tar.gz
context-style debug switch
-rw-r--r--doc/hybridtest.tex3
-rw-r--r--mod/tex/context/third/rst/t-rst.mkiv49
2 files changed, 29 insertions, 23 deletions
diff --git a/doc/hybridtest.tex b/doc/hybridtest.tex
index 8f1cca9..bd509c0 100644
--- a/doc/hybridtest.tex
+++ b/doc/hybridtest.tex
@@ -1,5 +1,4 @@
-\usemodule[rst]
-\setupRST[debug=yes]
+\usemodule[rst][test=yes]
\setuphead[chapter][page=no,style=bold]
\def\RSTCTX{{\em rst}\kern.5pt\CONTEXT}
diff --git a/mod/tex/context/third/rst/t-rst.mkiv b/mod/tex/context/third/rst/t-rst.mkiv
index a64a0d1..a332df9 100644
--- a/mod/tex/context/third/rst/t-rst.mkiv
+++ b/mod/tex/context/third/rst/t-rst.mkiv
@@ -33,13 +33,20 @@
%D Loading the reStructuredText parser.
\ctxloadluafile{rst_parser}
-\def\RST_enable_verbose{%
- \doif{\RSTparameter{debug}}\v!yes\ctxlua{thirddata.rst_helpers.rst_debug = true}%
-}
-\appendtoks \RST_enable_verbose \to \everysetupRST
+\startmoduletestsection
+ \ctxlua{thirddata.rst_helpers.rst_debug = true}
+\stopmoduletestsection
+
+%%% Leaving this here in case we need to revert to locally
+%%% toggling debugging code.
+
+%\def\RST_enable_verbose{%
+ %\doif{\RSTparameter{debug}}\v!yes\ctxlua{thirddata.rst_helpers.rst_debug = true}%
+%}
+%\appendtoks \RST_enable_verbose \to \everysetupRST
%D Setting some globals.
-\setupRST [debug=no]
+%\setupRST [debug=no]
%D This command loads and processes the \type{*.rst} file.
\def\typesetRSTfile#1{\ctxlua{thirddata.rst.do_rst_file("#1")}}
@@ -48,22 +55,22 @@
%D except for grouping, escaping and cs arguments.
\newcatcodetable \RST_catcodes
\startcatcodetable \RST_catcodes
- \catcode`\^^I = 12 % ascii tab is a blank space
- \catcode`\^^M = 12 % ascii return is end-line
- \catcode`\^^L = 12 % ascii form-feed
- \catcode`\ = 12
- \catcode`\^^Z = 12
- \catcode`\\ = 0
- \catcode`\% = 12
- \catcode`\# = 6
- \catcode`\_ = 12
- \catcode`\^ = 12
- \catcode`\& = 12
- \catcode`\| = 12
- \catcode`\{ = 1
- \catcode`\} = 2
- \catcode`\~ = 12
- \catcode`\$ = 12
+ \catcode`\^^I = 12
+ \catcode`\^^M = 12
+ \catcode`\^^L = 12
+ \catcode`\ = 12
+ \catcode`\^^Z = 12
+ \catcode`\\ = 0
+ \catcode`\% = 12
+ \catcode`\# = 6
+ \catcode`\_ = 12
+ \catcode`\^ = 12
+ \catcode`\& = 12
+ \catcode`\| = 12
+ \catcode`\{ = 1
+ \catcode`\} = 2
+ \catcode`\~ = 12
+ \catcode`\$ = 12
\stopcatcodetable
%D The environment \type{\[start|stop]RST} and the macro