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

Add support for inline tables to TOML lexer #1359

Merged
merged 1 commit into from Nov 20, 2019

Conversation

pyrmont
Copy link
Contributor

@pyrmont pyrmont commented Nov 13, 2019

The current TOML lexer does not support inline tables. This PR fixes that by adding a new :inline state.

This fixes #826.

@pyrmont pyrmont self-assigned this Nov 13, 2019
@pyrmont pyrmont added the needs-review The PR needs to be reviewed label Nov 13, 2019
@pyrmont pyrmont changed the title Add support for inline tables Add support for inline tables to TOML lexer Nov 13, 2019
@pyrmont pyrmont removed the needs-review The PR needs to be reviewed label Nov 20, 2019
@pyrmont pyrmont merged commit b8b955c into rouge-ruby:master Nov 20, 2019
arp242 added a commit to arp242/rouge that referenced this pull request Oct 12, 2023
A TOML table looks like:

	[tblname]
	key = 'value'

You can also use inline tables like so:

	[tblname]
	key = 'value'
	inline = {key = 'value'}

However, the "inline" would get highlighted as a table (same as
"[tblname]") rather than a regular key, which is very jarring and
unexpected IMHO.

It looks like it's been like this ever since inline tables were added in
rouge-ruby#1359, but I don't think anyone really wants this behaviour.
github-merge-queue bot pushed a commit that referenced this pull request Dec 3, 2023
A TOML table looks like:

	[tblname]
	key = 'value'

You can also use inline tables like so:

	[tblname]
	key = 'value'
	inline = {key = 'value'}

However, the "inline" would get highlighted as a table (same as
"[tblname]") rather than a regular key, which is very jarring and
unexpected IMHO.

It looks like it's been like this ever since inline tables were added in
#1359, but I don't think anyone really wants this behaviour.
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.

Add support for TOML's inline tables
1 participant