Commit d16bc56d authored by Adam P. Goucher's avatar Adam P. Goucher

Accept history counterparts in load_rules

parent aa1153f2
......@@ -289,7 +289,7 @@ def compile_rules(*rules, **kwargs):
def load_rules(*rules, **kwargs):
rules = [sanirule(r) for r in rules]
rules = [sanirule(r, drop_history=True) for r in rules]
soname = compile_rules(*rules, **kwargs)
from .pythlib import Session
......
......@@ -33,7 +33,7 @@ def create_rule(rulestring):
rule_property(rulestring, 'create_rule')
def sanirule(rulestring):
def sanirule(rulestring, drop_history=False):
if '.' in rulestring:
rulestring = rule2files(rulestring)
......@@ -43,7 +43,7 @@ def sanirule(rulestring):
rulestring = rulestring.lower()
if (len(rulestring) > 7) and (rulestring[-7:] == 'history'):
return sanirule(rulestring[:-7]) + 'History'
return sanirule(rulestring[:-7], drop_history) + ('' if drop_history else 'History')
if '/' in rulestring:
rparts = rulestring.split('/')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment