Swedish adaptation: Instegscertifikat and HAREC
- 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 <noreply@anthropic.com>
This commit is contained in:
@@ -5,15 +5,16 @@ from mistletoe.span_token import SpanToken
|
||||
|
||||
class NonbreakingSpaces(SpanToken):
|
||||
"""
|
||||
Insert unbreakable space into span token (§ 3)
|
||||
Identifies "§$number", "Abs.$number", "Klasse [A,E,N]" w/ and without space between.
|
||||
Insert unbreakable space into span token (3 §)
|
||||
Identifies "$number §", "$number kap.", "$number st.", "$number mom." as well as
|
||||
"PTSFS $number", "Report $number", "Rec. $number" and "Bilaga $number" w/ and without space between.
|
||||
"""
|
||||
|
||||
pattern = re.compile(r"(§|Abs\.|Klasse)\s?(\d|[NEA])")
|
||||
pattern = re.compile(r"(?:\b(\d+)\s?(§|kap\.|st\.|mom\.)|\b(PTSFS|Report|Rec\.|Bilaga|bilaga)\s?(\d))")
|
||||
|
||||
def __init__(self, match_object):
|
||||
self.first = match_object.group(1)
|
||||
self.second = match_object.group(2)
|
||||
self.first = match_object.group(1) or match_object.group(3)
|
||||
self.second = match_object.group(2) or match_object.group(4)
|
||||
|
||||
|
||||
class NonbreakingSpacesDots(SpanToken):
|
||||
|
||||
Reference in New Issue
Block a user