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

Colon in multiline strings causes improper formatting #194

Open
gustaff-weldon opened this issue Feb 22, 2024 · 1 comment
Open

Colon in multiline strings causes improper formatting #194

gustaff-weldon opened this issue Feb 22, 2024 · 1 comment

Comments

@gustaff-weldon
Copy link

For the given config:

    "vscode-yaml-sort.emptyLinesUntilLevel": 2,
    "vscode-yaml-sort.useLeadingDashes": false,
    "vscode-yaml-sort.lineWidth": 10000,
    "vscode-yaml-sort.sortOnSave": 0,
    "vscode-yaml-sort.quotingType": "\"",

The following yaml snippet formats improperly, it looks like the : in url trips of the parser:

jobs:
  build:
    steps:
      - run: |
          ls -al
          wget http://example.com

Expected:

jobs:

  build:
    steps:
      - run: |
          ls -al 
          wget http://example.com

Actual:

jobs:

  build:
    steps:
      - run: |
          ls -al  wget http://example.com

While testing, I removed : in http: and it formats ok:

jobs:
  build:
    steps:
      - run: |
          ls -al
          wget http//example.com

gives:

jobs:

  build:
    steps:
      - run: |
          ls -al
          wget http//example.com
@AGrabovajFitA
Copy link

Same issue here when writing a description that has a ":" in any line other than the first one.

---
  description: >
    first line
    second line: fails due to the colon

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

2 participants