@@ -8,8 +8,8 @@ first_line_match: '^This is (?:Lua(?:HB)?|pdfe?|Xe)?TeXk?, Version '
88
99variables :
1010 drive_char : ' [a-zA-Z]'
11- file_name : ' {{file_char}}+ {{file_ext}}{{file_break}}'
12- file_char : ' [\w.-]' # note: assume sane path names
11+ file_name : ' {{file_char}}*? {{file_ext}}{{file_break}}'
12+ file_char : ' [\s\ w.-]' # note: assume sane path names
1313 file_ext : ' \.{{file_ext_start}}{{file_ext_char}}*'
1414 file_ext_start : ' [a-zA-Z]'
1515 file_ext_char : ' [a-zA-Z0-9]'
@@ -108,7 +108,7 @@ contexts:
108108
109109 block-path-begin-continuation :
110110 # possible incomplete relative path or filename, starting at eol
111- - match : ' [\w-]+\.?\n'
111+ - match : ' [\s\ w-]+\.?\n'
112112 set :
113113 - block-unquoted-path-meta
114114 - block-unquoted-path-expect-file
@@ -188,7 +188,7 @@ contexts:
188188
189189 block-unquoted-path-expect-file :
190190 # file name or extentions beginning with period
191- - match : ^{{file_char}}*?{{file_ext}}{{file_break }}
191+ - match : ^{{file_name }}
192192 pop : 2
193193 # file extension without period
194194 - match : ^{{file_ext_char}}+{{file_break}}
@@ -204,12 +204,10 @@ contexts:
204204 1 : punctuation.separator.path.log
205205 pop : 1
206206 # consume very long file or folder name
207- - match : ^[\w-]{79}\n
208- set : block-unquoted-path-expect-segment
209- - match : ^[\w.-]{79}\n
207+ - match : ^{{file_char}}{79}\n
210208 pop : 1
211209 # file name or exteions beginning with period
212- - match : ^{{file_char}}*?{{file_ext}}{{file_break }}
210+ - match : ^{{file_name }}
213211 pop : 1
214212 # otherwise it is not a block
215213 - match : ^
@@ -221,7 +219,7 @@ contexts:
221219 block-unquoted-ext :
222220 - meta_scope : entity.name.section.filename.log
223221 # file name or exteions beginning with period
224- - match : ^{{file_char}}*?{{file_ext}}{{file_break }}
222+ - match : ^{{file_name }}
225223 pop : 1
226224 # file extension without period
227225 - match : ^{{file_ext_char}}+{{file_break}}
@@ -236,7 +234,7 @@ contexts:
236234 # begin of normal block body
237235 - match : ^(?![{{file_char}}\\/]+{{file_break}})
238236 pop : 1
239- - match : (?=[ \t( )])
237+ - match : (?=\s*[\[\]\{\}\(\ )])
240238 pop : 1
241239 - match : ' [\\/]'
242240 scope : punctuation.separator.path.log
0 commit comments