fix: Space support for halfwidthspaces
This commit is contained in:
@@ -8,7 +8,7 @@ class HalfwidthSpaces(SpanToken):
|
||||
Insert halfwidth space into span token (Z. B.)
|
||||
Identifies "z.B.", "d.h." and "D.h." with and without space in between.
|
||||
"""
|
||||
pattern = re.compile(r"\b(z|d|D)\.(B|h)\.")
|
||||
pattern = re.compile(r"\b(z|Z|d|D)\.\s?(B|h)\.")
|
||||
|
||||
def __init__(self, match_object):
|
||||
self.first = match_object.group(1)
|
||||
|
||||
@@ -6,7 +6,7 @@ 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 w\ space between.
|
||||
Identifies "§$number", "Abs.$number", "Klasse [A,E,N]" w/ and without space between.
|
||||
"""
|
||||
pattern = re.compile(r"(§|Abs\.|Klasse)\s?(\d|[NEA])")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user