From: Luke Kenneth Casson Leighton Date: Thu, 30 Jun 2022 18:43:10 +0000 (+0100) Subject: add extra lookup for SV X-Git-Tag: opf_rfc_ls005_v1~1437 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ebc1a463c3c7cf3a9d2b7ec68e859ccd5fdd136b;p=libreriscv.git add extra lookup for SV --- diff --git a/openpower/pandoc_img.py b/openpower/pandoc_img.py index 638954627..2569d0a52 100755 --- a/openpower/pandoc_img.py +++ b/openpower/pandoc_img.py @@ -48,13 +48,9 @@ def inlinenotes(k, v, f, meta): # link page if v.startswith("[[") and v.endswith("]]"): link = v[2:-2] - if '|' in link: - link, ref = link.split("|") - return Link(['', [], []], - [Str(link)], - [ref, '']) out.write(" link %s\n" % link) - lookups = {'sv': 'Scalable Vectors for the Power ISA', + lookups = {'sv': 'Scalable Vectors for Power ISA', + 'SV|sv': 'Scalable Vectors for Power ISA', 'sv/overview': 'Overview Chapter', 'sv/compliancy_levels': 'Compliancy Levels', 'sv/svp64': 'SVP64 Chapter', @@ -78,6 +74,11 @@ def inlinenotes(k, v, f, meta): return Link(['', [], []], [Str(lookups[link])], ['#%s' % link, '']) + if '|' in link: + link, ref = link.split("|") + return Link(['', [], []], + [Str(link)], + [ref, '']) if k == 'Link': out.write(" link type %s\n" % \ (type(v[1][0])))