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

Loading real yaml fixtures containing markdown links fails #1048

Closed
c33s opened this issue Aug 10, 2020 · 2 comments
Closed

Loading real yaml fixtures containing markdown links fails #1048

c33s opened this issue Aug 10, 2020 · 2 comments

Comments

@c33s
Copy link

c33s commented Aug 10, 2020

App\Entity\Item:
    item_1
        __construct:
            visible: true
            rank: 50
            text: >
                example text
                more text [markdown link with reference][1]
                
                [1]: https://github.com/nelmio/alice/issues/new

leads to UnresolvableValueExceptionFactory

@c33s
Copy link
Author

c33s commented Aug 10, 2020

it's an escaping problem.

changing all to

App\Entity\Item:
    item_1
        __construct:
            visible: true
            rank: 50
            text: >
                example text
                more text \[markdown link with reference\]\[1\]
                
                \[1\]: https://github.com/nelmio/alice/issues/new

think the following issue would be the best location where a solution could be found #840

@c33s c33s closed this as completed Aug 10, 2020
@theofidry
Copy link
Member

theofidry commented Aug 14, 2020

@c33s just thought of it but maybe there is a simple solution: add a new delimiter:

App\Entity\Item:
    item_1
        __construct:
            visible: true
            rank: 50
            text: >
                ALICE_ESCAPE # will escape all that follows
                example text
                more text \[markdown link with reference\]\[1\]
                
                \[1\]: https://github.com/nelmio/alice/issues/new
            anotherText: >
                ALICE_ESCAPE_START # will escape all that follows
                example text
                more text \[markdown link with reference\]\[1\]
                
                \[1\]: https://github.com/nelmio/alice/issues/new
                ALICE_ESCAPE_END # everything after is not escaped hence the following current will be evaluated
                <current()>

And in the expression language we add a new token/parser that takes precedence or something. I say "simple" in that it looks simple but I don't know how feasible that actually is. I have a brief memory of having looked at it once but I don't remember if I stopped by lack of time or because I hit a wall

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