MoinLight

Changeset

306:4474f27d4b25
2021-10-25 Paul Boddie raw files shortlog changelog graph Added convenience method for appending inline nodes to regions.
moinformat/parsers/common.py (file)
     1.1 --- a/moinformat/parsers/common.py	Sat Oct 09 00:34:01 2021 +0200
     1.2 +++ b/moinformat/parsers/common.py	Mon Oct 25 00:52:27 2021 +0200
     1.3 @@ -3,7 +3,7 @@
     1.4  """
     1.5  Moin wiki parsing functionality.
     1.6  
     1.7 -Copyright (C) 2017, 2018, 2019 Paul Boddie <paul@boddie.org.uk>
     1.8 +Copyright (C) 2017, 2018, 2019, 2021 Paul Boddie <paul@boddie.org.uk>
     1.9  
    1.10  This program is free software; you can redistribute it and/or modify it under
    1.11  the terms of the GNU General Public License as published by the Free Software
    1.12 @@ -519,6 +519,12 @@
    1.13  
    1.14          region.append(node)
    1.15  
    1.16 +    def append_inline(self, region, node):
    1.17 +
    1.18 +        "Append to 'region' the given 'node'."
    1.19 +
    1.20 +        region.append_inline(node)
    1.21 +
    1.22      def end_region(self, region):
    1.23  
    1.24          "End the parsing of 'region', breaking out of the parsing loop."