diff options
| author | Philipp Gesang <phg42.2a@gmail.com> | 2014-08-08 07:23:42 +0200 | 
|---|---|---|
| committer | Philipp Gesang <phg42.2a@gmail.com> | 2014-08-08 07:23:42 +0200 | 
| commit | 3d54b809e92a5518111d8a157582344e740ea9d0 (patch) | |
| tree | e36c2dc2b44fb5a9e4ef4869d20831ac2b5ceba0 /src | |
| parent | cad0cd07c802056e731d793413efb1781d0c39a0 (diff) | |
| parent | 32296e68a23ddb5f035e6991733466ea82231c95 (diff) | |
| download | luaotfload-3d54b809e92a5518111d8a157582344e740ea9d0.tar.gz | |
Merge pull request #247 from phi-gamma/master
fixes
Diffstat (limited to 'src')
| -rw-r--r-- | src/luaotfload-configuration.lua | 26 | ||||
| -rw-r--r-- | src/luaotfload-features.lua | 4 | 
2 files changed, 15 insertions, 15 deletions
| diff --git a/src/luaotfload-configuration.lua b/src/luaotfload-configuration.lua index bf841f7..ec38d90 100644 --- a/src/luaotfload-configuration.lua +++ b/src/luaotfload-configuration.lua @@ -483,6 +483,18 @@ local option_spec = {  ---                               FORMATTERS  ------------------------------------------------------------------------------- +local commented = function (str) +  return ";" .. str +end + +local underscore_replacer = lpeg.replacer ("_", "-", true) + +local dashed = function (var) +  --- INI spec dictates that dashes are valid in variable names, not +  --- underscores. +  return underscore_replacer (var) or var +end +  local indent = "  "  local format_string = function (var, val)    return stringformat (indent .. "%s = %s", var, val) @@ -516,19 +528,7 @@ local format_keyval = function (var, val)  end  local format_section = function (title) -  return stringformat ("[%s]", title) -end - -local commented = function (str) -  return ";" .. str -end - -local underscore_replacer = lpeg.replacer ("_", "-", true) - -local dashed = function (var) -  --- INI spec dictates that dashes are valid in variable names, not -  --- underscores. -  return underscore_replacer (var) or var +  return stringformat ("[%s]", dashed (title))  end  local conf_header = [==[ diff --git a/src/luaotfload-features.lua b/src/luaotfload-features.lua index f01c45b..9b895ce 100644 --- a/src/luaotfload-features.lua +++ b/src/luaotfload-features.lua @@ -771,14 +771,14 @@ local apply_default_features = function (speclist)      end      for feat, state in next, requested do -        if not speclist[feat] == nil then speclist[feat] = state end +        if speclist[feat] == nil then speclist[feat] = state end      end      for feat, state in next, default_features.global do          --- This is primarily intended for setting node          --- mode unless “base” is requested, as stated          --- in the manual. -        if not speclist[feat] then speclist[feat] = state end +        if speclist[feat] == nil then speclist[feat] = state end      end      return speclist  end | 
