get mdwn_inline.py to understand both the openpower/isa and
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Nov 2023 15:45:10 +0000 (15:45 +0000)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Fri, 17 Nov 2023 15:45:42 +0000 (15:45 +0000)
openpower/isatables directories, include anything not just fields.txt

openpower/mdwn_inline.py

index 2c03ae22c917e9d6eeca01a5e28d127c1d337787..6dec26a8b14052c1a2012116b53016b6d43fe432 100755 (executable)
@@ -80,9 +80,13 @@ def recursive_inline(f, input_name, depth):
             if fname.endswith(".mdwn"):
                 with open_tracked(wiki_path + "/" + fname) as inc:
                     recursive_inline(inc, fname, depth + 1)
-            elif fname == 'openpower/isatables/fields.text':
-                with open_tracked(
-                        wiki_path + "/../openpower-isa/" + fname) as inc:
+            elif fname.startswith('openpower/isatables'):
+                pth = wiki_path + "/../openpower-isa/" + fname
+                with open_tracked(pth) as inc:
+                    recursive_inline(inc, fname, depth + 1)
+            elif fname.startswith('openpower/isa'):
+                pth = wiki_path + "/../openpower-isa/" + fname + ".mdwn"
+                with open_tracked(pth) as inc:
                     recursive_inline(inc, fname, depth + 1)
             else:
                 with open_tracked(wiki_path + "/" + fname + ".mdwn") as inc: