Repository: BoboTiG/ebook-reader-dict

Issue:
[EN] Support  'mono' and 'monospace' templates
- Wiktionary page: https://en.wiktionary.org/wiki/shebang

Wikicode:
```
{{monospace|#!}}
```

Output:
```
(Monospace)
```

Expected:
```
<span style="font-family: monospace, monospace;">#!</span>
```
To be tested on actual device
---

Model link, if any: https://en.wiktionary.org/wiki/Template:mono
Aliases https://en.wiktionary.org/wiki/Special:WhatLinksHere?target=Template%3Amono&namespace=&hidetrans=1&hidelinks=1

<!-- POLAR PLEDGE BADGE START -->
## Upvote & Fund

- We're using [Polar.sh](https://polar.sh/tiger-222) so you can upvote and help fund this issue.
- We receive the funding once the issue is completed & confirmed by you.
- Thank you in advance for helping prioritize & fund our backlog.

<a href="https://polar.sh/BoboTiG/ebook-reader-dict/issues/1649">
<picture>
  <source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/api/github/BoboTiG/ebook-reader-dict/issues/1649/pledge.svg?darkmode=1">
  <img alt="Fund with Polar" src="https://polar.sh/api/github/BoboTiG/ebook-reader-dict/issues/1649/pledge.svg">
</picture>
</a>
<!-- POLAR PLEDGE BADGE END -->


Discussion:

Patch:
diff --git a/wikidict/lang/en/__init__.py b/wikidict/lang/en/__init__.py
index 479f5053..8f07136e 100644
--- a/wikidict/lang/en/__init__.py
+++ b/wikidict/lang/en/__init__.py
@@ -164,6 +164,9 @@
     "Latn-def": "f'{italic(\"The name of the Latin-script letter\")} {strong(parts[3])}.' if parts[2] == 'name' else ''",
     # {{Latn-def-lite|en|name|O|o}}
     "Latn-def-lite": "f'{italic(\"The name of the Latin-script letter\")} {strong(parts[3])}.' if parts[2] == 'name' else ''",
+    # {{monospace|#!}}
+    "mono": "f'<span style=\"font-family:monospace\">{parts[1]}</span>'",
+    "monospace": "f'<span style=\"font-family:monospace\">{parts[1]}</span>'",
     # {{n-g|Definite grammatical ...}}
     "n-g": "italic(parts[-1].lstrip('1='))",
     # {{n-g-lite|Definite grammatical ...}}
@@ -174,6 +177,10 @@
     "ng-lite": "italic(parts[-1].lstrip('1='))",
     # {{ngd|Definite grammatical ...}}
     "ngd": "italic(parts[-1].lstrip('1='))",
+    # {{nobr|1=[ ...=C=C=C=... ]}}
+    "nobr": 'f\'<span style="white-space:nowrap">{parts[1].lstrip("1=")}]</span>\'',
+    # {{nowrap|1=[ ...=C=C=C=... ]}}
+    "nowrap": 'f\'<span style="white-space:nowrap">{parts[1].lstrip("1=")}]</span>\'',
     # {{non gloss|Definite grammatical ...}}
     "non gloss": "italic(parts[-1].lstrip('1='))",
     # {{non-gloss|Definite grammatical ...}}


Test patch:
diff --git a/tests/test_en.py b/tests/test_en.py
index cd603360..77b8bf8c 100644
--- a/tests/test_en.py
+++ b/tests/test_en.py
@@ -366,10 +366,14 @@ def test_parse_word(
         ("{{initialism of|en|Inuit Qaujimajatuqangit|nodot=1}}", "<i>Initialism of</i> <b>Inuit Qaujimajatuqangit</b>"),
         ("{{IPAfont|ʌ}}", "⟨ʌ⟩"),
         ("{{Latn-def|en|name|O|o}}", "<i>The name of the Latin-script letter</i> <b>O</b>."),
+        ("{{monospace|#!}}", '<span style="font-family:monospace">#!</span>'),
+        ("{{mono|#!}}", '<span style="font-family:monospace">#!</span>'),
         ("{{n-g|Definite grammatical}}", "<i>Definite grammatical</i>"),
         ("{{ngd|Definite grammatical}}", "<i>Definite grammatical</i>"),
+        ("{{nobr|1=[ ...=C=C=C=... ]}}", '<span style="white-space:nowrap">[...=C=C=C=...]</span>'),
         ("{{non-gloss definition|Definite grammatical}}", "<i>Definite grammatical</i>"),
         ("{{non-gloss definition|1=Definite grammatical}}", "<i>Definite grammatical</i>"),
+        ("{{nowrap|1=[ ...=C=C=C=... ]}}", '<span style="white-space:nowrap">[...=C=C=C=...]</span>'),
         ("{{q|formal|used only in the plural}}", "(<i>formal</i>, <i>used only in the plural</i>)"),
         ("{{qual|Used only in the plural in the UK}}", "(<i>Used only in the plural in the UK</i>)"),
         ("{{qualifier|Used only in the plural in the UK}}", "(<i>Used only in the plural in the UK</i>)"),