diff options
author | bptato <nincsnevem662@gmail.com> | 2023-05-29 01:29:53 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-01 13:01:44 +0200 |
commit | d48aa61fd8e3595a8ae90cfacc9f35318acbe8d4 (patch) | |
tree | d47aa6dd7e93ed0d38bfb90ec49c4541a66bea19 /src | |
parent | fce6c2af50b4ae25dfe4c82932492df7cc433969 (diff) | |
download | chawan-d48aa61fd8e3595a8ae90cfacc9f35318acbe8d4.tar.gz |
config: fix omnirules
Rename variable so it's mapped properly...
Diffstat (limited to 'src')
-rw-r--r-- | src/config/config.nim | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/config/config.nim b/src/config/config.nim index d2650a2e..5817bdc2 100644 --- a/src/config/config.nim +++ b/src/config/config.nim @@ -101,7 +101,7 @@ type network*: NetworkConfig display*: DisplayConfig siteconf: seq[StaticSiteConfig] - omnirules: seq[StaticOmniRule] + omnirule: seq[StaticOmniRule] page*: ActionMap line*: ActionMap @@ -170,7 +170,7 @@ proc getSiteConfig*(config: Config, jsctx: JSContext): seq[SiteConfig] = result.add(conf) proc getOmniRules*(config: Config, jsctx: JSContext): seq[OmniRule] = - for rule in config.omnirules: + for rule in config.omnirule: let re = compileRegex(rule.match, 0) var conf = OmniRule( match: re.get @@ -462,7 +462,7 @@ proc parseConfig(config: Config, dir: string, t: TomlValue) = config.parseConfig(dir, staticRead(dir / s)) else: config.parseConfig(dir, newFileStream(dir / s)) - #TODO: for omnirules/siteconf, check if substitution rules are specified? + #TODO: for omnirule/siteconf, check if substitution rules are specified? proc parseConfig(config: Config, dir: string, stream: Stream, name = "<input>") = let toml = parseToml(stream, dir / name) |