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

YAML parser swallows a single character when Unicode is used #5177

Open
greg-at-moderne opened this issue Mar 14, 2025 · 1 comment
Open
Labels
bug Something isn't working parser-yaml

Comments

@greg-at-moderne
Copy link
Contributor

greg-at-moderne commented Mar 14, 2025

What version of OpenRewrite are you using?

Current main = 27f7bd7

What is the smallest, simplest way to reproduce the problem?

The following unit test case:

    @Test
    void unicodeCharacters() {
        rewriteRun(
          yaml(
              """
                - name: Autobuild
                # 📚COMMENT
                - name: Perform CodeQL Analysis
              """)
        );
    }

in rewrite-yaml

fails with:

  - name: Autobuild
  # 📚COMMENT
- - name: Perform CodeQL Analysis
+ - ame: Perform CodeQL Analysis

Context

@greg-at-moderne greg-at-moderne added the bug Something isn't working label Mar 14, 2025
@greg-at-moderne greg-at-moderne moved this to Backlog in OpenRewrite Mar 14, 2025
@knutwannheden
Copy link
Contributor

I analyzed this problem at some point. I can try to dig out what I found if necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working parser-yaml
Projects
Status: Backlog
Development

No branches or pull requests

2 participants