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

Support comments with new lines #334

Closed
ljacqu opened this issue Jul 3, 2023 · 1 comment
Closed

Support comments with new lines #334

ljacqu opened this issue Jul 3, 2023 · 1 comment
Milestone

Comments

@ljacqu
Copy link
Member

ljacqu commented Jul 3, 2023

With string blocks being a thing now, one might want to define a comment as one string with new lines. ConfigMe does not support this—having any comment with new lines in it will just break the export completely. It would be good to revise this.

@ljacqu ljacqu added this to the ConfigMe 2.0.0 milestone Jul 3, 2023
@ljacqu ljacqu modified the milestones: ConfigMe 2.0.0, 1.4.0 Release Aug 12, 2023
@ljacqu
Copy link
Member Author

ljacqu commented Aug 12, 2023

You can now use text blocks to define comments:

    @Comment("""
        Test
        Testeroni""")
    public static final Property<Integer> P = new IntegerProperty("p", 3);

This is equivalent to:

    @Comment({
        "Test",
        "Testeroni"
    })
    public static final Property<Integer> P = new IntegerProperty("p", 3);

With either variant, the resulting YAML is:

# Test
# Testeroni
p: 3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant