diff options
author | Philipp Gesang <megas.kapaneus@gmail.com> | 2011-08-20 22:35:49 +0200 |
---|---|---|
committer | Philipp Gesang <megas.kapaneus@gmail.com> | 2011-08-20 22:35:49 +0200 |
commit | ab0a580b61ae53c4d22cb93fd52006cb102b92e9 (patch) | |
tree | eaaa5155d54a3288300bf73bd74f73afaf7d5aaa /mod/tex/context/third/rst/t-rst.mkiv | |
parent | bc3bb79d16c52531387c70c24f94513b62dcfa67 (diff) | |
download | context-rst-ab0a580b61ae53c4d22cb93fd52006cb102b92e9.tar.gz |
optional tab as indent handling; fixed missing blank line at eof bug
Diffstat (limited to 'mod/tex/context/third/rst/t-rst.mkiv')
-rw-r--r-- | mod/tex/context/third/rst/t-rst.mkiv | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/mod/tex/context/third/rst/t-rst.mkiv b/mod/tex/context/third/rst/t-rst.mkiv index 0a3e25b..bb727b0 100644 --- a/mod/tex/context/third/rst/t-rst.mkiv +++ b/mod/tex/context/third/rst/t-rst.mkiv @@ -112,12 +112,22 @@ %D Thus, the user should never supply any of these manually, %D neither before nor after \type{\typesetRSTfile}. %D +%D We now handle rogue utf-8 byte order marks on demand, just set +%D the optional parameter \type{stripBOM} to {\em true}. +%D +%D There also is an option \type{expandtab} to convert tabs +%D (ascii 0x09) to indents prior to converting reST input. The +%D expansion width defaults to {\em 4} and can be configured +%D through the parameter \type{shiftwidth} (takes an integer). +%D %D \showsetup{typesetRSTfile} \def\do_typesetRSTfile[#1]#2{% \iffirstargument \getparameters[RST][#1]% - \doifdefined{\RSTstripBOM}{\ctxlua{thirddata.rst.strip_BOM = "\RSTstripBOM"}}% + \doifdefined{RSTstripBOM} {\ctxlua{thirddata.rst.strip_BOM = \RSTstripBOM}}% + \doifdefined{RSTexpandtab} {\ctxlua{thirddata.rst.expandtab = \RSTexpandtab}}% + \doifdefined{RSTshiftwidth}{\ctxlua{thirddata.rst.shiftwidth = \RSTshiftwidth}}% \fi \ctxlua{thirddata.rst.do_rst_file("#2")}% } |