diff options
author | Marius <mariausol@gmail.com> | 2010-09-22 14:41:02 +0300 |
---|---|---|
committer | Marius <mariausol@gmail.com> | 2010-09-22 14:41:02 +0300 |
commit | 628da7aa02508a351932702b1631a32195511ee2 (patch) | |
tree | 1b41ef16d56e22b76fe3ba1bd92bc291145da7e0 /tex/context/base/strc-ref.lua | |
parent | 9d17a4bc572f48289b6d188684a7bbf8c46839fe (diff) | |
download | context-628da7aa02508a351932702b1631a32195511ee2.tar.gz |
beta 2010.09.22 12:33
Diffstat (limited to 'tex/context/base/strc-ref.lua')
-rw-r--r-- | tex/context/base/strc-ref.lua | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/tex/context/base/strc-ref.lua b/tex/context/base/strc-ref.lua index bced781fd..c1152250f 100644 --- a/tex/context/base/strc-ref.lua +++ b/tex/context/base/strc-ref.lua @@ -763,6 +763,9 @@ end local prefixsplitter = lpegCs(lpegP((1-lpegP(":"))^1 * lpegP(":"))) * lpegCs(lpegP(1)^1) + +-- todo: add lots of tracing here + local function identify(prefix,reference) local set = resolve(prefix,reference) local bug = false @@ -936,13 +939,22 @@ local function identify(prefix,reference) p = splitprefix end end - else + end + -- todo: strict here + if not i then i = collected[prefix] i = i and i[inner] if i then p = prefix end end + if not i and prefix ~= "" then + i = collected[""] + i = i and i[inner] + if i then + p = "" + end + end if i then var.i = { "reference", i } references.resolvers.reference(var) @@ -966,7 +978,8 @@ local function identify(prefix,reference) p = splitprefix end end - else + end + if not i then i = derived[prefix] i = i and i[inner] if i then |