summaryrefslogtreecommitdiff
path: root/otfl-font-nms.lua
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2010-06-25 17:45:51 +0300
committerKhaled Hosny <khaledhosny@eglug.org>2010-06-25 17:45:51 +0300
commitde1a75f617318803025eb74d8aea7409608309e2 (patch)
tree298a2286392aeca9606cca3777859179d855ffbe /otfl-font-nms.lua
parent1bce7c38af9f58e3541fc2593c1de3deda99d340 (diff)
downloadluaotfload-de1a75f617318803025eb74d8aea7409608309e2.tar.gz
Handle trailing spaces and inline comments
This turned out to be easier that I first thought.
Diffstat (limited to 'otfl-font-nms.lua')
-rw-r--r--otfl-font-nms.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/otfl-font-nms.lua b/otfl-font-nms.lua
index a8ec08a..12da443 100644
--- a/otfl-font-nms.lua
+++ b/otfl-font-nms.lua
@@ -465,9 +465,12 @@ local function read_blacklist()
if files and type(files) == "table" then
for _,v in next, files do
for line in io.lines(v) do
+ line = line:strip() -- to get rid of lines like " % foo"
if line:find("^%%") or line:is_empty() then
-- comment or empty line
else
+ line = line:split("%")[1]
+ line = line:strip()
if trace_search then
logs.report("blacklisted file: %s", line)
end