aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--markdown/extensions/__init__.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/markdown/extensions/__init__.py b/markdown/extensions/__init__.py
index 4c1dcba..3f36bb3 100644
--- a/markdown/extensions/__init__.py
+++ b/markdown/extensions/__init__.py
@@ -14,15 +14,19 @@ class Extension:
"""
self.config = configs
- def getConfig(self, key):
+ def getConfig(self, key, default=''):
""" Return a setting for the given key or an empty string. """
if key in self.config:
return self.config[key][0]
else:
- return ""
+ return default
+
+ def getConfigs(self):
+ """ Return all configs settings as a list of tuples. """
+ return [(key, self.getConfig(key)) for key in self.config.keys()]
def getConfigInfo(self):
- """ Return all config settings as a list of tuples. """
+ """ Return all config descriptions as a list of tuples. """
return [(key, self.config[key][1]) for key in self.config.keys()]
def setConfig(self, key, value):