plint

French poetry validator (local mirror of https://gitlab.com/a3nm/plint)
git clone https://a3nm.net/git/plint/
Log | Files | Refs | README

commit dafdf1e8c69af7caa6fb55539d4efe10851bddac
parent d04c54c6498c18dcc2e5ffb3ad226e69d4fd4568
Author: Antoine Amarilli <a3nm@a3nm.net>
Date:   Mon, 12 Aug 2019 18:36:22 +0200

do not crash on templates with empty identifiers

Diffstat:
template.py | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/template.py b/template.py @@ -235,7 +235,7 @@ class Template: return Pattern(metric, myid, femid, rhyme.Constraint(*constraint)) def reset_conditional(self, d): - return dict((k, v) for k, v in d.items() if k[0] == '!') + return dict((k, v) for k, v in d.items() if len(k) > 0 and k[0] == '!') def reset_state(self, with_femenv=False): """Reset our state, except ids starting with '!'"""