alexpovel/betterletter

Fix underscore handling/splitting

Closed this issue · 0 comments

A raw input of _natuerlich_ won't currently be processed correctly:

$ echo "_natuerlich_" | betterletter de
_natuerlich_

Only noticed this now since most Markdown engines use * for italics, but Slack forces _.
_ is the only "non-letter" included in \w, on which we split:

items = re.split(r"(\w+)", text) # Can be words and non-words ("!", "-", ...)