From de1a75f617318803025eb74d8aea7409608309e2 Mon Sep 17 00:00:00 2001 From: Khaled Hosny Date: Fri, 25 Jun 2010 17:45:51 +0300 Subject: Handle trailing spaces and inline comments This turned out to be easier that I first thought. --- otfl-blacklist.cnf | 2 +- otfl-font-nms.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/otfl-blacklist.cnf b/otfl-blacklist.cnf index d9cf068..b659334 100644 --- a/otfl-blacklist.cnf +++ b/otfl-blacklist.cnf @@ -1,2 +1,2 @@ % Tackes ages to load -LastResort.ttf +LastResort.ttf % a MacOSX font, but also available for free from unicode.org 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 -- cgit v1.2.3