Skip to content

Incorrect Rendering of .gitconfig File Contents #2720

@JLameter

Description

@JLameter

Description:
When attempting to display the contents of a .gitconfig file in INI format, there is an issue with the rendering of comments. Currently, anything after a semicolon is treated as a comment, even if it is not intended to be. This problem becomes apparent when using tools like mkdocs to display the file contents.

Steps to Reproduce:

  1. Create a .gitconfig file with the following contents:
```cfg
[alias]
    test = "some stuff with a semi colon ; and then more stuff"
    test2 = "some more stuff with a semi colon ; and then more stuff" # (1)!
```
  1. Use mkdocs or a similar tool to display the file contents.

Expected Result:
The .gitconfig file should be displayed accurately, showing the contents as intended without any rendering issues.

Actual Result:
The rendered display of the .gitconfig file, using mkdocs, shows incorrect rendering. The comments associated with the "test2" alias are consumed by an annotation, leading to missing text in the rendered output.

image

Additional Information:
Here's a real-world example of a config value where the semicolon does not indicate a comment:

```cfg
[alias]
   fetch-reset = "!git fetch ; git reset --hard @{u}"
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lexingarea: changes to individual lexers

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy