Closed cirosantilli closed 2 years ago
Ah, likely (document.find_by context: :literal).each do |literal|
is the way to go by copying from: https://github.com/asciidoctor/asciidoctor-extensions-lab/blob/e922e9ed10244586d510d5cdc35e3be6cad9c297/lib/multirow-table-header-tree-processor.rb
I think we should transfer this issue to: https://github.com/asciidoctor/asciidoctor.org
Ah, likely (document.find_by context: :literal).each do |literal| is the way to go
Yes, could you please submit your changes at: https://github.com/asciidoctor/asciidoctor.org/blob/master/docs/_includes/exten-tree.adoc
But keep in mind that the future documentation site will be using: https://github.com/asciidoctor/asciidoctor/blob/v1.5.7-docs/docs/asciidoctor/modules/api/pages/tree-processor.adoc
I also don't like that there is code in asciidoctor.org. The real code is in the extensions lab, and that's the code that should be in the docs. The code sample stored in asciidoctor.org has never been tested.
Good to see that the docs will move into the main repo! Is it going to be on master, or just a separate branch? master would be awesome.
Yes, they are being moved to the repositories where the code lives (docs as code). So the main docs for Asciidoctor will be in asciidoctor/asciidoctor. This is the repository that will assemble the docs: https://github.com/asciidoctor/docs.asciidoctor.org
The docs will live with the branch that they document. So the docs in development will be on master. The docs for a specific release will be on the release branch. That also means the docs will be versioned for the first time.
The migration of the docs is now complete. See https://docs.asciidoctor.org.
It turns out the example code was just woefully out of date. I've updated it and confirmed that it works with the latest version of Asciidoctor. See https://docs.asciidoctor.org/asciidoctor/latest/extensions/tree-processor/
At https://asciidoctor.org/docs/user-manual/#tree-processor-example
First I add missing requires and convert the deprecated EOL to
Asciidoctor::LF
to make it work again, put it all in one file, and it gives:This works for the tested example document on the docs:
However, if I add a definition list to the example, it fails:
because it doesn't have context:
I don't know what's the best way to handle it, but it would be good to use it in that example.