##// END OF EJS Templates
renderer: fixed the helper funtion to original version. This...
marcink -
r401:40cb52d4 default
parent child Browse files
Show More
@@ -107,8 +107,9 b' class MarkupRenderer(object):'
107 @classmethod
107 @classmethod
108 def renderer_from_filename(cls, filename, exclude):
108 def renderer_from_filename(cls, filename, exclude):
109 """
109 """
110 Detect renderer from filename and optionally use exlcude list to
110 Detect renderer markdown/rst from filename and optionally use exclude
111 remove some options. This is mostly used in helpers
111 list to remove some options. This is mostly used in helpers.
112 Returns None when no renderer can be detected.
112 """
113 """
113 def _filter(elements):
114 def _filter(elements):
114 if isinstance(exclude, (list, tuple)):
115 if isinstance(exclude, (list, tuple)):
@@ -121,7 +122,7 b' class MarkupRenderer(object):'
121 if filename.endswith(tuple(_filter([x[0] for x in cls.RST_EXTS if x[0]]))):
122 if filename.endswith(tuple(_filter([x[0] for x in cls.RST_EXTS if x[0]]))):
122 return 'rst'
123 return 'rst'
123
124
124 return 'plain'
125 return None
125
126
126 @classmethod
127 @classmethod
127 def generate_readmes(cls, all_readmes, extensions):
128 def generate_readmes(cls, all_readmes, extensions):
General Comments 0
You need to be logged in to leave comments. Login now