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

Feature Request: Allow multi-line text with fields as a Record. #38

Open
rupertlssmith opened this issue Mar 16, 2020 · 1 comment
Open

Comments

@rupertlssmith
Copy link

rupertlssmith commented Mar 16, 2020

I notice that Annotations and Records both have the type Record - which tells me there is room in the data model for a block of text and some fields.

What I want to do is to have a multi-line block of text and combine it together with some fields. This is for a situation where I will be showing some source code and highlighting a position within the code, and it would be nice if I could give the example source code over multiple lines.

I tried to get the parser to work with mulitple lines by guessing how they might be represented:

[some source text
over multiple lines]{source| pos = (0,0)-(1,10)}
|> Source
some source text
over multiple lines
    pos = (0,0)-(1,10)
|> Source
    source = some source text
over multiple lines
    pos = (0,0)-(1,10)

None of which work. The only way to combine text with fields as a Record, seems to be the single line annotation form:

[text on single line]{ann| ... fields }

Is there some way to combine multi-line text with some fields to form a Record? If not, it would be a nice feature to have, and I think the data model already has room for it, so only needs a new format added to the parser.

Format 2 above would be the nicest to work with.

@rupertlssmith
Copy link
Author

I also tried putting a block within a block to see if it could be done that way:

|> Source
    Line 1
    Line 2
    |> Highlights
        -- (0,0)-(0,1)
        -- (1,3)-(1,5)

But this does not seem to work, and the inner block is just taken as text.

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

1 participant