Comments (6)
Yeah, I was lazy with that and didn't bother with double-escaped regular expressions, which is required in double-quoted strings.
However, you practically never want to use double-quoted strings in YAML anyway, because
- Most strings don't need quoting at all. Yours doesn't, for example. And neither does your second.
- Single-quoted strings have way better escape mechanisms, especially fΓΌr regular expressions, in that you only need to escape a single-quote inside a string and nothing else -- especially no back-slashes.
So yeah, while this is indeed a bug, I'm very much on the "won't fix" side here because it's just not worth it imo. We might want to mention that in the docs too.
In other news, all syntax definitions in this package need a new pass and deserve to be using the new shiny .sublime-syntax
format. From scratch. Problem is it's still only available for the dev channel.
from packagedev.
OK, thanks for the response. I'll try to use single or non-quoted strings when I can figure out how to escape them
from packagedev.
Closing in favor of #67.
from packagedev.
Reopening since I'm probably not going to rewrite these syntaxes (a lot of effort for legacy tech). I will revisit this later and re-consider whether I find fixing this worth it or not.
from packagedev.
Actually... I just realized that I already dismissed this in the new syntax for .sublime-syntax
files as well because using single-quoted strings is simply superior over double-quoted, since I don't have to mess with string annoying escape sequences there.
So my recommendation will be to use single quotes for all YAML strings that cannot be plain, but I might fix this small issue just to not blow up.
from packagedev.
Closing as wontfix. I don't see myself (or anyone else) coming back to this and I also haven't seen a tmLanguage-YAML file in the wild for a while.
from packagedev.
Related Issues (20)
- PackageDev's Tab-Indentation-Error-Dialog interrupts Goto Anything HOT 1
- pop: true completion should be pop: 1 in version: 2 syntaxes HOT 2
- highlighting breaks with `'null'` variable in syntax HOT 1
- What is this `confirm` attribute ? HOT 3
- Are these (still) used ?
- PackageDev wants to manipulate indentation settings for non-test files HOT 1
- Tested syntax is not automatically applied to syntax_test_ files HOT 1
- Extend Default CSS syntax for ST-specific CSS
- Invalid highlighting in sublime-theme syntax with null value
- Indentation settings error message when closing syntax test files HOT 1
- Invalid highlighting in tmPreferences syntax with dict in array HOT 1
- Treat application settings differently
- Add `syntax_test` shortcut for first character of previous line HOT 1
- Allow Tab to enumerate scopes in `syntax_test` files
- Syntax Tests with partial symbols not recognized HOT 1
- Python 3.10+ `with` statement highlighting issue HOT 3
- Add support for `context` key in mousemaps
- On every edit of a file without tabs: You MUST use spaces! error
- support `TM_COMMENT_CASE_INSENSITIVE` for ST4153+ HOT 1
- Use `sublime.choose_font_dialog` when editing `font_face` setting HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from packagedev.