Closed ggrossetie closed 8 years ago
I will fix this quickly...
but it's a real case?
use source
and literal delimiter ?
http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary
@ldez @mojavelinux Good question, I don't know if there's another way to write this. A better exemple is:
= Source block delimiter ....
== Exemple
[source]
....
:testdir: ${project.build.testSourceDirectory} // <1>
:testpkg: {testdir}/org/asciidoctor // <2>
[source,java]
----
include::{testpkg}/WhenAttributesAreUsed.java[tag=uri-scheme] // <3>
----
<1> Positionne l'attribut permettant de masquer le schéma sur les liens
....
// <1> Utilise une variable du build Maven (filtering)
// <2> Réutilise la variable définie juste au dessus pour ajouter le package
// <3> Précise le tag à utiliser (possibilité de préciser plusieurs tag séparé par des virgules)
== Résultat
:testpkg: src/test/java/org/asciidoctor
[source,java,indent=0]
----
include::{testpkg}/WhenAttributesAreUsed.java[tags=uri-scheme]
----
<1> Positionne l'attribut permettant de masquer le schéma sur les liens
The documentation talk about open block and listing bloc but literal...
Cool, a sample :+1:
You can do that with open block:
= Source block delimiter ....
== Exemple
[source]
--
:testdir: ${project.build.testSourceDirectory} // <1>
:testpkg: {testdir}/org/asciidoctor // <2>
[source,java]
----
include::{testpkg}/WhenAttributesAreUsed.java[tag=uri-scheme] // <3>
----
<1> Positionne l'attribut permettant de masquer le schéma sur les liens
--
// <1> Utilise une variable du build Maven (filtering)
// <2> Réutilise la variable définie juste au dessus pour ajouter le package
// <3> Précise le tag à utiliser (possibilité de préciser plusieurs tag séparé par des virgules)
== Résultat
:testpkg: src/test/java/org/asciidoctor
[source,java,indent=0]
----
include::{testpkg}/WhenAttributesAreUsed.java[tags=uri-scheme]
----
<1> Positionne l'attribut permettant de masquer le schéma sur les liens
Yep, it's valid. The source style can be on listing, literal or open structural containers.
But it's explained nowhere else. :cry:
Same thing for other styles, like passthrough, admonition or quotes ??
But it's explained nowhere else. :cry:
:sob:
The official ruling is that the source style can be applied to a verbatim structural container, of which there are two: listing (hyphens) and literal (dots). The open block was an experiment. I've since concluded that using open block for this purpose is not a good practice and we shouldn't support it in the grammar.
@mojavelinux Another question, in the documentation it's write that Open block doesn't act passthrough blocks.
Open block: Anonymous block that can act as any block except passthrough or table blocks.
http://asciidoctor.org/docs/user-manual/#built-in-blocks-summary
If I do:
[pass]
--
<div>
<u>underline me1</u>
</div>
--
foo
--
<div>
<u>underline me2</u>
</div>
--
the rendering:
I have misunderstood something?
@Mogztter you can prevent callout substitution for a better rendering.
[source]
....
:testdir: ${project.build.testSourceDirectory} // \<1>
:testpkg: {testdir}/org/asciidoctor // <2>
....
I'm not sure if this is the same issue as this, but I am also experiencing an open block breaking highlighting.
This is with language-asciidoc v. 1.4.6
@lucascosti can you open another issue? Your problem is different. In this new issue, can you provide a syntax sample? Thanks.
@ldez yep, sure; done as #148 .
in the documentation it's write that Open block doesn't act passthrough blocks.
It can. Here's the definitive list atm: https://github.com/asciidoctor/asciidoctor/blob/master/lib/asciidoctor.rb#L275
We're still struggling a bit to decide what open block should be allowed to do, and when to use it. My current position is that an open block should be allowed "masquerade" as other complex blocks (example, sidebar, etc), but most of the time it is used simply to group blocks together with no meaning (an anonymous group so to speak) or for extensions. (I'm not a big fan of using open blocks for verbatim content).
Description
Source block literal with
....
literal prevents the rest of the document from being correctly highlighted.Screenshots
Syntax example