1.1 --- a/moinformat/serialisers/__init__.py Fri Jun 30 00:37:36 2023 +0200
1.2 +++ b/moinformat/serialisers/__init__.py Fri Jun 30 00:40:39 2023 +0200
1.3 @@ -23,11 +23,15 @@
1.4
1.5 # Top-level functions.
1.6
1.7 -def get_serialiser(name):
1.8 +def get_serialiser(name, doctype=None):
1.9
1.10 - "Return the main serialiser class for the format having the given 'name'."
1.11 + """
1.12 + Return the main serialiser class for the format having the given 'name'.
1.13 + If 'doctype' is indicated, obtain a serialiser class specific to that
1.14 + document type. Otherwise, a general Moin serialiser class is obtained.
1.15 + """
1.16
1.17 - return serialisers["%s.moin" % name]
1.18 + return serialisers["%s.%s" % (name, doctype or "moin")]
1.19
1.20 def make_serialiser(metadata, format=None):
1.21