Giter Club home page Giter Club logo

Comments (6)

FichteFoll avatar FichteFoll commented on August 23, 2024

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

  1. Most strings don't need quoting at all. Yours doesn't, for example. And neither does your second.
  2. 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.

sparr avatar sparr commented on August 23, 2024

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.

FichteFoll avatar FichteFoll commented on August 23, 2024

Closing in favor of #67.

from packagedev.

FichteFoll avatar FichteFoll commented on August 23, 2024

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.

FichteFoll avatar FichteFoll commented on August 23, 2024

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.

FichteFoll avatar FichteFoll commented on August 23, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.