]> AND Public Git Repository - simgrid.git/blobdiff - docs/source/_ext/showfile.py
Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
close gforge bug 18137 (allow different stack sizes): that was possible since years...
[simgrid.git] / docs / source / _ext / showfile.py
index 06845d40ed4062fd3f64e0ab4fec3c96419e47b3..14f4d0975a85b6943176a8de1b3519502bf82309 100644 (file)
@@ -72,6 +72,9 @@ class ExampleTabDirective(Directive):
         if filename[-3:] == '.py':
             language = 'Python'
             langcode = 'py'
+        elif filename[-2:] == '.c':
+            language = 'C'
+            langcode = 'c'
         elif filename[-4:] == '.cpp':
             language = 'C++'
             langcode = 'cpp'
@@ -79,7 +82,7 @@ class ExampleTabDirective(Directive):
             language = 'XML'
             langcode = 'xml'
         else:
-            raise Exception("Unknown language '{}'. Please choose '.cpp', '.py' or '.xml'".format(language))
+            raise Exception("Unknown language '{}'. Please choose '.cpp', '.py', '.c' or '.xml'".format(language))
 
         for idx, line in enumerate(self.content.data):
             self.content.data[idx] = '   ' + line
@@ -161,4 +164,3 @@ def setup(app):
 
     app.connect('builder-inited', add_assets)
     app.connect('build-finished', copy_assets)
-