Skip to content

syntax: multiple issues in syntax highlighting of TOML files #4933

@sknaumov

Description

@sknaumov

Is there an existing issue for this?

  • I have searched the existing issues

Midnight Commander version and build configuration

GNU Midnight Commander 4.8.30
Built with GLib 2.80.0
Built with S-Lang 2.3.3 with terminfo database
Built with libssh2 1.11.0
With builtin Editor and Aspell support
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With support for X11 events
With internationalization support
With multiple codepages support
With ext2fs attributes support
Virtual File Systems:
 cpiofs, tarfs, sfs, extfs, ext2undelfs, ftpfs, sftpfs, fish
Data types:
 char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

Operating system

Linux sknaumov-ThinkPad-T14-Gen-3 6.8.0-90-generic #91-Ubuntu SMP PREEMPT_DYNAMIC Tue Nov 18 14:14:30 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux

Is this issue reproducible using the latest version of Midnight Commander?

  • I confirm the issue is still reproducible with the latest version of Midnight Commander

How to reproduce

Just open attached TOML file in mcedit.

Expected behavior

I've prepared alternative toml.syntax file.

Exact colors are discussable, but I've tried to unify them with syntax files of similar formats.

Image Image

Actual behavior

  1. Broken comments.
  2. Escapes in basic strings are neither highlighted nor properly handled.
  3. Literal strings are not highlighted.
  4. Multi-line strings are not properly handled.
  5. Inconsistent highlighting of inline tables.
  6. Sections are hardly distinguished from comments.
  7. Colors are not unified with other similar files (YAML, INI).
  8. Acid-like look when there are a lot of strings.
Image Image

Additional context

Is there a chance that this fix will be available in Ubuntu 26.04?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs triageNeeds triage by maintainersprio: mediumHas the potential to affect progress

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions