Remove variable.other from CSV highlighting

This commit is contained in:
Keith Hall 2021-04-01 22:55:53 +03:00 committed by David Peter
parent 3559079de0
commit 848ceb6f10
4 changed files with 35 additions and 37 deletions

View File

@ -16,8 +16,6 @@ contexts:
fields:
- match: ''
push:
- field_or_record_separator
- field5
- field_or_record_separator
- field4
- field_or_record_separator
@ -70,15 +68,11 @@ contexts:
field3:
- match: ''
set:
- meta_content_scope: meta.field-3.csv variable.other
- meta_content_scope: meta.field-3.csv constant.numeric
- include: field_contents
field4:
- match: ''
set:
- meta_content_scope: meta.field-4.csv constant.numeric
- include: field_contents
field5:
- match: ''
set:
- meta_content_scope: meta.field-5.csv keyword.operator
- meta_content_scope: meta.field-4.csv keyword.operator
- include: field_contents

View File

@ -8,19 +8,21 @@ Forename,Surname,House No.,Street,City,Postcode
# ^ punctuation.separator.sequence
# ^^^^^^ meta.field-4
# ^ punctuation.separator.sequence
# ^^^^ meta.field-5
# ^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
John,Doe,87,Citiville,TU43 6GH
# ^^^^^^^^ meta.field-2
John,Doe,87,Logon Road,Citiville,TU43 6GH
#^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^ meta.field-2
# ^ punctuation.separator.sequence
# ^^ meta.field-3
# ^ punctuation.separator.sequence
# ^^^^^^^^^ meta.field-4
# ^^^^^^^^^^ meta.field-4
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-5
# ^^^^^^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-2
Jane,Doe,22,"""Fun"" Street","The City, County",FA90 1XA
#^^^ meta.field-1
# ^ punctuation.separator.sequence
@ -32,11 +34,11 @@ Jane,Doe,22,"""Fun"" Street","The City, County",FA90 1XA
# ^^ constant.character.escape
# ^^ constant.character.escape
# ^ punctuation.separator.sequence
# ^ meta.field-5 string.quoted.double punctuation.definition.string.begin
# ^^^^^^^^^^^^^^^^^ meta.field-5 string.quoted.double
# ^ meta.field-5 string.quoted.double punctuation.definition.string.end
# ^ meta.field-1 string.quoted.double punctuation.definition.string.begin
# ^^^^^^^^^^^^^^^^^ meta.field-1 string.quoted.double
# ^ meta.field-1 string.quoted.double punctuation.definition.string.end
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
# ^^^^^^^^ meta.field-2
Fred,Bloggs,"19","Street
#^^^ meta.field-1
# ^ punctuation.separator.sequence
@ -53,6 +55,6 @@ Lines",Citee,P0stc0d3
#^^^^^ meta.field-4 string.quoted.double
# ^ meta.field-4 punctuation.definition.string.end
# ^ punctuation.separator.sequence
# ^^^^^ meta.field-5
# ^^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
# ^^^^^^^^ meta.field-2

Can't render this file because it contains an unexpected character in line 1 and column 15.

View File

@ -8,19 +8,21 @@ Forename Surname House No. Street City Postcode
# ^ punctuation.separator.sequence
# ^^^^^^ meta.field-4
# ^ punctuation.separator.sequence
# ^^^^ meta.field-5
# ^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
John Doe 87 Citiville TU43 6GH
# ^^^^^^^^ meta.field-2
John Doe 87 Logon Road Citiville TU43 6GH
#^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^ meta.field-2
# ^ punctuation.separator.sequence
# ^^ meta.field-3
# ^ punctuation.separator.sequence
# ^^^^^^^^^ meta.field-4
# ^^^^^^^^^^ meta.field-4
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-5
# ^^^^^^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-2
Jane Doe 22 """Fun"" Street" "The City County" FA90 1XA
#^^^ meta.field-1
# ^ punctuation.separator.sequence
@ -32,11 +34,11 @@ Jane Doe 22 """Fun"" Street" "The City County" FA90 1XA
# ^^ constant.character.escape
# ^^ constant.character.escape
# ^ punctuation.separator.sequence
# ^ meta.field-5 string.quoted.double punctuation.definition.string.begin
# ^^^^^^^^^^^^^^^^^ meta.field-5 string.quoted.double
# ^ meta.field-5 string.quoted.double punctuation.definition.string.end
# ^ meta.field-1 string.quoted.double punctuation.definition.string.begin
# ^^^^^^^^^^^^^^^^^ meta.field-1 string.quoted.double
# ^ meta.field-1 string.quoted.double punctuation.definition.string.end
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
# ^^^^^^^^ meta.field-2
Fred Bloggs "19" "Street
#^^^ meta.field-1
# ^ punctuation.separator.sequence
@ -53,6 +55,6 @@ Lines" Citee P0stc0d3
#^^^^^ meta.field-4 string.quoted.double
# ^ meta.field-4 punctuation.definition.string.end
# ^ punctuation.separator.sequence
# ^^^^^ meta.field-5
# ^^^^^ meta.field-1
# ^ punctuation.separator.sequence
# ^^^^^^^^ meta.field-1
# ^^^^^^^^ meta.field-2

Can't render this file because it contains an unexpected character in line 1 and column 15.

View File

@ -1,7 +1,7 @@
first,last,address,city,zip
John,Doe,120 any st.,"Anytown, WW",08123
first,last,address,city,zip
John,Doe,120 any st.,"Anytown, WW",08123
a,b
1,"ha 
""ha"" 
ha",120 any st.,"Anytown, WW",08123
3,4,120 any st.,"Anytown, WW",08123
ha",120 any st.,"Anytown, WW",08123
3,4,120 any st.,"Anytown, WW",08123

Can't render this file because it contains an unexpected character in line 2 and column 177.