SUMMARY The use of an apostrophe in a string inside an array causes the syntax highlighting to fail from the apostrophe to the end of the file. If I double quote the string the problem doesn't occur. Problem does not occur if I use a backtick. STEPS TO REPRODUCE 1. Create a simple YAML file and ensure the file type is set to "markup:yaml". 2. Create a key in a YAML file that takes its values from an array. 3. Enter a string that contains an apostrophe in the array. OBSERVED RESULT From the apostrophe to the end of the file syntax highlighting no longer works. EXPECTED RESULT Syntax highlighting should not fail. SOFTWARE/OS VERSIONS Fedora 41 GNOME Shell 47.4 KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION Example entry that fails: editors: [David O'Brien] Example entry that does not fail: editors: ["David O'Brien"]
https://yaml.org/spec/1.2.2/#single-quoted-style Is that not just a side effect on ' starting a single quoted string?
Hi - just changing status here as this appears to be pending a response, thanks!
(In reply to Christoph Cullmann from comment #1) > https://yaml.org/spec/1.2.2/#single-quoted-style > > Is that not just a side effect on ' starting a single quoted string? tbh I don't know. If this falls under the heading of "expected behaviour" then ok, but it took me by surprise. I currently get around it by not using an array. Feel free to close this if you think it's not a bug. cheers.