-
-
Notifications
You must be signed in to change notification settings - Fork 784
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
Make Raw Content available for titles and content-parts #1146
Comments
The reason this is a challenge is because we want to keep the converters / backends simply by allowing the call to As for the content, you can access that already using several methods:
These just aren't mapped right in AsciidoctorJ. I think the only time we are converting on access is the title. The open question is, what should the API look like to get the raw title instead of the converted title? Perhaps it should be something like "metadata" which would contain the raw title source. |
I will open an issue to AsciidoctorJ to implement these missing methods. 2014-10-13 9:46 GMT+02:00 Dan Allen notifications@github.com:
+----------------------------------------------------------+ |
Thanks @lordofthejars! |
We have the same problem with ListItem. There needs to be a way to access to read the raw text. For now, this content can be accessed using instance_variable_get. For example:
We just need to work out the public API. |
This came up again, and it got me thinking that the right terminology might be |
It would be very convenient, and I would need this feature too, to resolve Alwinator/asciidoctor-lists#6 |
Looking at the existing API closer, now I'm thinking that |
This has become a duplicate of #4386 (and vice versa). |
When accessing the title of a document or section it is already rendered to HTML
(I found an unrendered version in the attributes)
The same is true for ContentPart content, so I cannot access the original text. Which is important if for instance that content is code that I want to run :)
The discussion should be about the APIs.
I could imagine, like in doucument.getTitle() that you get an (lazily populated)
Content
-object back that has methods like:The text was updated successfully, but these errors were encountered: