Skip to content

Add support for comments after section headers (closes #1259)#1260

Merged
sharkdp merged 1 commit intosharkdp:masterfrom
YtvwlD:ini-section-comment
Oct 6, 2020
Merged

Add support for comments after section headers (closes #1259)#1260
sharkdp merged 1 commit intosharkdp:masterfrom
YtvwlD:ini-section-comment

Conversation

@YtvwlD
Copy link
Copy Markdown
Contributor

@YtvwlD YtvwlD commented Oct 5, 2020

There's no canonical definition of what's the INI syntax, but Python's ConfigParser supports comments after section headers:

[section] ; comment

I also put a PR in upstream (clintberry/sublime-text-2-ini#29), but there have been no merges for a few years.
Also, we already have a modified version here, so a change upstream doesn't take effect.

@sharkdp
Copy link
Copy Markdown
Owner

sharkdp commented Oct 5, 2020

Thank you very much for this contribution.

I'm okay with merging this (even though I usually like to stay close to the upstream repo). But it would be great if we could add a test for the INI syntax in a separate PR first before merging this (see #1213 for details).

There's no canonical definition of what's the INI syntax, but Python's `ConfigParser` supports comments after section headers:

```ini
[section] ; comment
```
@YtvwlD YtvwlD force-pushed the ini-section-comment branch from 0b0b438 to 6b2aa05 Compare October 5, 2020 19:16
@sharkdp sharkdp merged commit 5e0b7f0 into sharkdp:master Oct 6, 2020
@sharkdp
Copy link
Copy Markdown
Owner

sharkdp commented Oct 6, 2020

Thank you for the update

@YtvwlD YtvwlD deleted the ini-section-comment branch October 6, 2020 18:04
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

Successfully merging this pull request may close these issues.

2 participants