Commit d8526087416be63e406159e7843b89e395bb14ba

vimd2h.py: discard duplicate unresolved warnings
Otherwise output can get quite spammy for cross-doc references, masking
the "real" unresolveds.
Author: Alin Mr
Author date (UTC): 2024-03-19 05:05
Committer name: Alin Mr
Committer date (UTC): 2024-03-19 05:18
Parent(s): 7f54c0178c3cad26441e2f5804c927eb56b5b783
Signing key:
Tree: 212331b3ffb2ae372617506077e2d0cdfd653066
File Lines added Lines deleted
vimd2h.py 11 8
File vimd2h.py changed (mode: 100755) (index e2136b3..edbf7db)
... ... class VimDoc2HTML(object):
73 73 def __init__(self, tags, version=None): def __init__(self, tags, version=None):
74 74 self._urls = { } self._urls = { }
75 75 self._urlsCI = { } self._urlsCI = { }
76 self._urlsUnresolved = set()
76 77 self._version = version self._version = version
77 78 for line in RE_NEWLINE.split(tags): for line in RE_NEWLINE.split(tags):
78 79 m = RE_TAGLINE.match(line) m = RE_TAGLINE.match(line)
 
... ... class VimDoc2HTML(object):
103 104 else: return links.link_plain else: return links.link_plain
104 105 elif css_class is not None: elif css_class is not None:
105 106 if css_class == 'l': if css_class == 'l':
106 lowerTag = tag.lower()
107 if lowerTag in self._urlsCI:
108 print('Unresolved reference: |%s|' % tag)
109 for key in self._urls:
110 if key.lower() == lowerTag:
111 print(' - tag with different case: |%s|' % key)
112 else:
113 print('Unresolved reference: |%s|' % tag)
107 if tag not in self._urlsUnresolved:
108 self._urlsUnresolved.add(tag)
109 lowerTag = tag.lower()
110 if lowerTag in self._urlsCI:
111 print('Unresolved reference: |%s|' % tag)
112 for key in self._urls:
113 if key.lower() == lowerTag:
114 print(' - tag with different case: |%s|' % key)
115 else:
116 print('Unresolved reference: |%s|' % tag)
114 117
115 118 return '<span class="' + css_class + '">' + html_escape[tag] + \ return '<span class="' + css_class + '">' + html_escape[tag] + \
116 119 '</span>' '</span>'
Hints

Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://code.reversed.top/user/xaizek/vimdoc2html

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@code.reversed.top/user/xaizek/vimdoc2html

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a pull request:
... clone the repository ...
... make some changes and some commits ...
git push origin master