# HG changeset patch # User Paul Boddie # Date 1633378742 -7200 # Node ID f328b06726f93774146981387969afe48bb5d0e2 # Parent f6d55a6615793814c8c3ce02d1d79ddee8bc3112 Handle directives without values. diff -r f6d55a661579 -r f328b06726f9 moinformat/serialisers/html/moin.py --- a/moinformat/serialisers/html/moin.py Mon Oct 04 22:18:39 2021 +0200 +++ b/moinformat/serialisers/html/moin.py Mon Oct 04 22:19:02 2021 +0200 @@ -3,7 +3,7 @@ """ HTML serialiser. -Copyright (C) 2017, 2018, 2019 Paul Boddie +Copyright (C) 2017, 2018, 2019, 2021 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -256,7 +256,10 @@ pass def directive(self, directive, extra): - name, text = directive.split(None, 1) + + # Obtain a blank value if the value is missing. + + name, text = (directive.split(None, 1) + [""])[:2] # Produce a readable redirect.