whoops cut in wrong place
authorLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 30 Jun 2022 18:54:13 +0000 (19:54 +0100)
committerLuke Kenneth Casson Leighton <lkcl@lkcl.net>
Thu, 30 Jun 2022 18:54:13 +0000 (19:54 +0100)
openpower/pandoc_img.py

index 458b11f453827f80aec0c7da711230c9a04def8f..ed107a42684e812a9451959803edb5abbc1f22b3 100755 (executable)
@@ -51,7 +51,7 @@ def inlinenotes(k, v, f, meta):
         find_brack = v.find(']]')
         if find_brack == -1:
             return
-        link = v[2:find_brack-2]
+        link = v[2:find_brack]
         out.write("     link %s\n" % link)
         lookups = {'sv': 'Scalable Vectors for Power ISA',
                    'SV|sv': 'Scalable Vectors for Power ISA',
@@ -77,12 +77,12 @@ def inlinenotes(k, v, f, meta):
             out.write("     found %s\n" % lookups[link])
             return [Link(['', [], []],
                         [Str(lookups[link])],
-                        ['#%s' % link, '']), Str(v[find_brack:])]
+                        ['#%s' % link, '']), Str(v[find_brack+2:])]
         if '|' in link:
             link, ref = link.split("|")
             return [Link(['', [], []],
                         [Str(link)],
-                        [ref, '']), Str(v[find_brack:])]
+                        [ref, '']), Str(v[find_brack+2:])]
     if k == 'Link':
         out.write("     link type %s\n" % \
             (type(v[1][0])))