Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apostrophe breaks syntax highlighting for Ini files #3

Open
aeschli opened this issue Mar 31, 2017 · 7 comments
Open

Apostrophe breaks syntax highlighting for Ini files #3

aeschli opened this issue Mar 31, 2017 · 7 comments

Comments

@aeschli
Copy link

aeschli commented Mar 31, 2017

From @thijsvandien on March 2, 2017 17:13

  • VSCode Version: Code 1.10.1 (653f8733dd5a5c43d66d7168b4701f94d72b62e5, 2017-03-02T00:27:09.350Z)
  • OS Version: Darwin x64 15.6.0
  • Extensions:
Extension Author Version
python donjayamanne 0.5.9
vim vscodevim 0.5.3

Steps to Reproduce:

  1. Create an ini file where a text value contains an apostrophe in the middle, e.g.:
[Sample]
SomeKey=Someone's Value
SomeOtherKey=42
  1. Note that from the apostrophe onward, the rest of the file is considered a string.

Different ini implementations have their own interpretations of values. E.g., Windows does not consider the apostrophes of a quoted value part of that value. I'm not aware of the exact rules, but at least the current highlighting behavior is wrong. I think it would be better to stick to the universally valid rules – sections, keys and values – and not to consider apostrophes special at all.

Copied from original issue: microsoft/vscode#21804

@myfonj
Copy link

myfonj commented Sep 23, 2019

This issue is addressed in PR #1 from 2015, maybe time has come to finally merge at least parts of it?

@jmiguel-hdez
Copy link

can PR #1 from 2015 be merged? or perhaps some other appropriate fix for syntax highlighting

@geerligs
Copy link

I would like to have this issue solved as well. Seems a fix is available (see #3 (comment))

@diatomicDisaster
Copy link

diatomicDisaster commented Mar 1, 2022

This is a really simple issue, no idea why it's been open for 5 years. A fix was provided 7 years ago, can it please be merged?

@edgetools
Copy link

It's 2024 and we're likely to see vscode replaced before this gets merged 😆

@ExtReMLapin
Copy link

MERGE IT ALREADY

@Holf
Copy link

Holf commented Sep 22, 2024

Until this does get fixed, a workaround to stop your entire .ini file losing its formatting is to immediately add a comment containing the closing ':

[section_1]
this_id = 281474976818284
that_id = 281474977838819
string_with_apostrophe = Mark's Keyboard Repair
# '

[section_2]
this_id = 281474976816734
that_id = 281474978538200
string_with_apostrophe = Pepper's Ghost
# '

Somewhat entertainingly, on writing out the example .ini file content for this comment I see the GitHub comment parser has exactly the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants