- Editions replaced by INSTEG, HAREC and UPPGRADERING (Instegscertifikat -> HAREC) - Question pool optional; simulator, homework tool and solutions switch off without one - All UI strings, templates, renderers and project JS localised to sv-SE (decimal comma, Swedish non-breaking-space rules, Å/Ä/Ö in Morse table) - DARC branding, membership CTA and German links removed; attribution footer added - Page names centralised in src/pages.py - README and docs rewritten in Swedish Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
17 lines
403 B
Python
17 lines
403 B
Python
import re
|
|
|
|
from mistletoe.span_token import SpanToken
|
|
|
|
|
|
class HalfwidthSpaces(SpanToken):
|
|
"""
|
|
Insert halfwidth space into span token (t. ex.)
|
|
Identifies "t.ex." and "T.ex." with and without space in between.
|
|
"""
|
|
|
|
pattern = re.compile(r"\b(t|T)\.\s?(ex)\.")
|
|
|
|
def __init__(self, match_object):
|
|
self.first = match_object.group(1)
|
|
self.second = match_object.group(2)
|