mirror of
https://gitlab.com/fdroid/fdroidserver.git
synced 2024-11-09 00:40:11 +01:00
Only make lists if a space follows the # or * sign
This prevents making a list item out of lines such as: *.rom images and allows using...
This commit is contained in:
parent
6c6a9c4bb2
commit
65d796c93a
@ -173,7 +173,7 @@ def main():
|
||||
# Invalid lists
|
||||
desc_chars = 0
|
||||
for line in app['Description']:
|
||||
if re.match(r'[ ]*\*[^ ]', line):
|
||||
if re.match(r'[ ]*[*#][^ .]', line):
|
||||
warn("Invalid bulleted list: '%s'" % line)
|
||||
desc_chars += len(line)
|
||||
|
||||
|
@ -311,22 +311,22 @@ class DescriptionFormatter:
|
||||
self.text_wiki += "%s\n" % line
|
||||
if not line:
|
||||
self.endcur()
|
||||
elif line.startswith('*'):
|
||||
elif line.startswith('* '):
|
||||
self.endcur([self.stUL])
|
||||
if self.state != self.stUL:
|
||||
self.text_html += '<ul>'
|
||||
self.state = self.stUL
|
||||
self.text_html += '<li>'
|
||||
self.text_plain += '*'
|
||||
self.text_plain += '* '
|
||||
self.addtext(line[1:])
|
||||
self.text_html += '</li>'
|
||||
elif line.startswith('#'):
|
||||
elif line.startswith('# '):
|
||||
self.endcur([self.stOL])
|
||||
if self.state != self.stOL:
|
||||
self.text_html += '<ol>'
|
||||
self.state = self.stOL
|
||||
self.text_html += '<li>'
|
||||
self.text_plain += '*' #TODO: lazy - put the numbers in!
|
||||
self.text_plain += '* ' #TODO: lazy - put the numbers in!
|
||||
self.addtext(line[1:])
|
||||
self.text_html += '</li>'
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user