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

Multi-line values and strings #23

Open
ahdinosaur opened this issue Aug 23, 2023 · 2 comments
Open

Multi-line values and strings #23

ahdinosaur opened this issue Aug 23, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@ahdinosaur
Copy link
Owner

ahdinosaur commented Aug 23, 2023

Describe the solution you'd like

A design similar to:

(Draft documentation)

Rimu supports multi-line values with > and >"

>

A multi-line expression.

Identation is removed, newlines are removed.

story: >
  """Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua. Eleifend donec pretium
  vulputate sapien nec sagittis aliquam malesuada."""

""" is the multi-line string character.

>"

A multi-line string.

Identation is removed. Newlines are preserved.

story: >"
  Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod
  tempor incididunt ut labore et dolore magna aliqua. Eleifend donec pretium
  vulputate sapien nec sagittis aliquam malesuada.

Describe alternatives you've considered or related projects

Additional context

@ahdinosaur ahdinosaur changed the title multi-line blocks and strings multi-line values and strings Aug 23, 2023
@ahdinosaur
Copy link
Owner Author

ahdinosaur commented Aug 23, 2023

NestedText has a different approach

key 4:
    key 4a: value 4a
    key 4b: value 4b
key 5:
    > first line of value 5
    > second line of value 5

->

{
    "key 4": {
        "key 4a": "value 4a",
        "key 4b": "value 4b"
    },
    "key 5": "first line of value 5\nsecond line of value 5"
}

@ahdinosaur
Copy link
Owner Author

my main consideration is i want the structure parser to be separate from the expression parser. so i don't want multi-line structure to be dependent on whether the expression is "done".

@ahdinosaur ahdinosaur changed the title multi-line values and strings Multi-line values and strings Sep 17, 2023
@ahdinosaur ahdinosaur added the enhancement New feature or request label Sep 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant