-
Notifications
You must be signed in to change notification settings - Fork 25
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
Implement recursive attributes #800
Comments
@pjanx just to clarify: you expect the output to be |
I'm not following you here. Is it related to #793? |
I have no objections about what Asciidoctor (or AsciiDoc, haven't checked) does with attributes, things have an obvious order. The first example does not do what it should in libasciidoc yet. The ending note was for context--what I actually want to have working: to retrieve an attribute in a renderer/backend that is expanded using attributes passed as command line options to the libasciidoc utility. Once this issue is resolved, I should be able to do that. |
ok, got it now. Thanks for the clarification! |
I've added this issue in Milestone 0.6 |
Fixes bytesparadise#800 Signed-off-by: Xavier Coulon <[email protected]>
…#801) Fixes #800 Signed-off-by: Xavier Coulon <[email protected]>
@pjanx it should be good now:
is now output as:
please let me know if it fixes your blocker |
Yeah, thanks. Just. What I had in mind writing "recursive" was "recursive evaluation", which I think I've established is not what's going on (rather a 1-level expansion). And I don't know how to better name this:
You can still call this "attributes in attributes", to convince yourself that there is some recursion going on, though it's stretching it. "Substitutions in attribute declarations/definitions" would be lengthier but also clearly not wrong. |
@pjanx indeed, recursive evaluation is not what I implemented in #801, but note that it also does not work with Asciidoc(tor) either:
renders as:
ie, it does not go beyond level-1 expansion. That being said, do you need a fully recursive expansion or is what I provided you with in #801 enough for you? |
Yeah, you're paraphrasing me ("I've established" referred to the issue description). And no, there's no need for this. |
fair enough, I did not realize what you meant by "I've established", so I added my own findings/thoughts here. |
This must say "foobar":
Asciidoctor makes this say "{def}bar", so it is seemingly evaluated during parsing:
I'm trying to do
doc.Attributes.GetAsStringWithDefault("mansource", "?")
where the value is composed using a string passed with the-a
command line option; I can't expand this string by any standard means.The text was updated successfully, but these errors were encountered: