File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -69,10 +69,10 @@ def parse_text(text: str) -> str:
69
69
70
70
def highlight_text (matches : re .Match [str ]) -> str :
71
71
return env .get_template ('highlight/text.html' ).render (
72
- before_var = matches [ 1 ] ,
73
- variable = matches [2 ],
72
+ before_var = "" ,
73
+ variable = matches [1 ],
74
74
after_var = matches [3 ],
75
- parsed_text = parse_text (matches [2 ])
75
+ parsed_text = parse_text (matches [1 ])
76
76
)
77
77
78
78
@@ -205,7 +205,7 @@ def process_line(
205
205
) -> str :
206
206
# Highlight localized strings
207
207
line = re .sub (
208
- r'([A-Za-z0-9_]+loc\((?:\d+, )?")((?:[^"\\]|\\.)+)(", "[a-z0-9_-]+"\) )' , # noqa: E501
208
+ r'(?: [A-Za-z0-9_]+loc\((?:\d+, )?")((?:[^"\\]|\\.)+)(", "[a-z0-9_-]+")\ )' , # noqa: E501
209
209
highlight_text ,
210
210
line ,
211
211
flags = re .IGNORECASE
You can’t perform that action at this time.
0 commit comments