diff options
author | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:58:56 +0000 |
---|---|---|
committer | Mojca Miklavec <mojca.miklavec@gmail.com> | 2014-05-05 20:58:56 +0000 |
commit | b41cac6cebc8095cf8eaf7e84f8a2d5f63b7be38 (patch) | |
tree | 485b647339dff06549a9e6209d29f420cb6e1834 /Master/texmf-dist/tex/context/base/buff-ini.lua | |
parent | 28d5537add2c5bc2b860143edfa07d359d8ddec0 (diff) |
ConTeXt 2014.05.05 22:31
git-svn-id: svn://tug.org/texlive/trunk@33858 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/context/base/buff-ini.lua')
-rw-r--r-- | Master/texmf-dist/tex/context/base/buff-ini.lua | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Master/texmf-dist/tex/context/base/buff-ini.lua b/Master/texmf-dist/tex/context/base/buff-ini.lua index 84532f0722d..c4046d649ed 100644 --- a/Master/texmf-dist/tex/context/base/buff-ini.lua +++ b/Master/texmf-dist/tex/context/base/buff-ini.lua @@ -194,7 +194,7 @@ local continue = false -- An \n is unlikely to show up as \r is the endlinechar but \n is more generic -- for us. --- This fits the way we fetch verbatim: the indentatio before the sentinel +-- This fits the way we fetch verbatim: the indentation before the sentinel -- determines the stripping. -- str = [[ @@ -238,7 +238,7 @@ local whatever = (P(1)-eol)^0 * eol^1 local strippers = { } -local function undent(str) -- new version, needs testing +local function undent(str) -- new version, needs testing: todo: not always needed, like in xtables local margin = lpegmatch(getmargin,str) if type(margin) ~= "string" then return str @@ -255,7 +255,7 @@ local function undent(str) -- new version, needs testing return lpegmatch(stripper,str) or str end -function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes) -- maybe move \\ to call +function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes,doundent) -- maybe move \\ to call local dn = getcontent(name) if dn == "" then nesting = 0 @@ -291,8 +291,8 @@ function commands.grabbuffer(name,begintag,endtag,bufferdata,catcodes) -- maybe if last == "\n" or last == "\r" then -- \n is unlikely as \r is the endlinechar dn = sub(dn,1,-2) end - if autoundent then - dn = undent(dn) + if doundent or (autoundent and doundent == nil) then + dn = undent(dn) end end assign(name,dn,catcodes) |