diff options
author | Hans Hagen <pragma@wxs.nl> | 2013-01-08 19:28:00 +0100 |
---|---|---|
committer | Hans Hagen <pragma@wxs.nl> | 2013-01-08 19:28:00 +0100 |
commit | 6839f83e77cb6f3d2ada608c917e7004fc925c24 (patch) | |
tree | 814f160babe3ad70ac7c1fcadee79317673b61f9 /tex/generic | |
parent | 5dca02e1882961ee70649f1ab96aead5c7f5910f (diff) | |
download | context-6839f83e77cb6f3d2ada608c917e7004fc925c24.tar.gz |
beta 2013.01.08 19:28
Diffstat (limited to 'tex/generic')
-rw-r--r-- | tex/generic/context/luatex/luatex-fonts-merged.lua | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/tex/generic/context/luatex/luatex-fonts-merged.lua b/tex/generic/context/luatex/luatex-fonts-merged.lua index 3fb5a2dae..8b36f4a17 100644 --- a/tex/generic/context/luatex/luatex-fonts-merged.lua +++ b/tex/generic/context/luatex/luatex-fonts-merged.lua @@ -1,6 +1,6 @@ -- merged file : luatex-fonts-merged.lua -- parent file : luatex-fonts.lua --- merge date : 01/08/13 01:19:52 +-- merge date : 01/08/13 19:28:06 do -- begin closure to overcome local limits and interference @@ -190,6 +190,8 @@ patterns.propername = R("AZ","az","__") * R("09","AZ","az", "__")^0 * P(-1) patterns.somecontent = (anything - newline - space)^1 -- (utf8char - newline - space)^1 patterns.beginline = #(1-newline) +patterns.longtostring = Cs(whitespace^0/"" * nonwhitespace^0 * ((whitespace^0/" " * (patterns.quoted + nonwhitespace)^1)^0)) + local function anywhere(pattern) --slightly adapted from website return P { P(pattern) + 1 * V(1) } end @@ -874,8 +876,9 @@ function string.limit(str,n,sentinel) -- not utf proof end end -local stripper = patterns.stripper -local collapser = patterns.collapser +local stripper = patterns.stripper +local collapser = patterns.collapser +local longtostring = patterns.longtostring function string.strip(str) return lpegmatch(stripper,str) or "" @@ -885,6 +888,10 @@ function string.collapsespaces(str) return lpegmatch(collapser,str) or "" end +function string.longtostring(str) + return lpegmatch(longtostring,str) or "" +end + -- function string.is_empty(str) -- return not find(str,"%S") -- end |