doc: wikiparser: Set icon dimensions to old values (temporarily)

- For easier diff

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Sunil Mohan Adapa 2020-08-26 00:20:45 -07:00 committed by James Valleroy
parent feb81b8fb6
commit 4448b5baa8
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808

View File

@ -616,7 +616,7 @@ def parse_text(line, context=None, parse_links=True):
target = f'{ICONS_DIR}/{WIKI_ICONS[line.strip()]}.png' target = f'{ICONS_DIR}/{WIKI_ICONS[line.strip()]}.png'
result.append( result.append(
EmbeddedAttachment(target, [PlainText(icon_text)], EmbeddedAttachment(target, [PlainText(icon_text)],
'height=20')) 'depth=16,width=16'))
line = line.lstrip().replace(icon_text, '', 1) line = line.lstrip().replace(icon_text, '', 1)
break break
@ -975,22 +975,22 @@ PlainText(' ')])]
>>> parse_wiki('/!\\\\') >>> parse_wiki('/!\\\\')
[Paragraph([EmbeddedAttachment('icons/alert.png', \ [Paragraph([EmbeddedAttachment('icons/alert.png', \
[PlainText('/!\\\\')], 'height=20'), PlainText(' ')])] [PlainText('/!\\\\')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('(./)') >>> parse_wiki('(./)')
[Paragraph([EmbeddedAttachment('icons/checkmark.png', \ [Paragraph([EmbeddedAttachment('icons/checkmark.png', \
[PlainText('(./)')], 'height=20'), PlainText(' ')])] [PlainText('(./)')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('{X}') >>> parse_wiki('{X}')
[Paragraph([EmbeddedAttachment('icons/icon-error.png', \ [Paragraph([EmbeddedAttachment('icons/icon-error.png', \
[PlainText('{X}')], 'height=20'), PlainText(' ')])] [PlainText('{X}')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('{i}') >>> parse_wiki('{i}')
[Paragraph([EmbeddedAttachment('icons/icon-info.png', \ [Paragraph([EmbeddedAttachment('icons/icon-info.png', \
[PlainText('{i}')], 'height=20'), PlainText(' ')])] [PlainText('{i}')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('{o}') >>> parse_wiki('{o}')
[Paragraph([EmbeddedAttachment('icons/star_off.png', \ [Paragraph([EmbeddedAttachment('icons/star_off.png', \
[PlainText('{o}')], 'height=20'), PlainText(' ')])] [PlainText('{o}')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('{*}') >>> parse_wiki('{*}')
[Paragraph([EmbeddedAttachment('icons/star_on.png', \ [Paragraph([EmbeddedAttachment('icons/star_on.png', \
[PlainText('{*}')], 'height=20'), PlainText(' ')])] [PlainText('{*}')], 'depth=16,width=16'), PlainText(' ')])]
>>> parse_wiki('{{attachment:cockpit-enable.png}}') >>> parse_wiki('{{attachment:cockpit-enable.png}}')
[Paragraph([EmbeddedAttachment('cockpit-enable.png', \ [Paragraph([EmbeddedAttachment('cockpit-enable.png', \