Convert Windows line endings to UNIX format, fixes display issues with micron files created on Windows

This commit is contained in:
Mark Qvist
2025-12-28 11:39:15 +01:00
parent 93cc790ebd
commit 5f3b2eb020

View File

@@ -1,6 +1,5 @@
import re
import unicodedata
import RNS
def strip_modifiers(text):
def process_characters(text):
@@ -26,5 +25,6 @@ def strip_modifiers(text):
stripped = re.sub(r'[\U000E0100-\U000E01EF]', '', stripped, flags=re.UNICODE)
stripped = re.sub(r'[\U0001F3FB-\U0001F3FF]', '', stripped, flags=re.UNICODE)
stripped = re.sub(r'[\u200D\u200C]', '', stripped)
stripped = re.sub(r'\r\n?', '\n', stripped)
return stripped