summaryrefslogtreecommitdiff
path: root/games-util/nml/files/nml-0.7.5-regex-py313.patch
blob: bef0c1002e210166c01ebab957c1bb33b3b573f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
https://github.com/OpenTTD/nml/issues/340
https://github.com/OpenTTD/nml/pull/341

From 0bebfe612d489a20fa5a71b06963ea3ee80379d0 Mon Sep 17 00:00:00 2001
From: glx22 <glx@openttd.org>
Date: Sat, 5 Oct 2024 01:00:32 +0200
Subject: [PATCH] Fix #340: Always use raw strings for token regex

--- a/nml/tokens.py
+++ b/nml/tokens.py
@@ -195,7 +195,7 @@ def t_ignore_comment(self, t):
         self.increment_lines(t.value.count("\n"))
 
     def t_ignore_whitespace(self, t):
-        "[ \t\r]+"
+        r"[ \t\r]+"
         pass
 
     def t_line_directive1(self, t):