Indentiation problems with generated Quote and Source

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Indentiation problems with generated Quote and Source

xcoulon
Hello,

I'm writing an article (with asciidoctor 1.5.0.preview.3 + awestruct) and I have the following issues with quote blocks and source blocks:

* the following block:
----
A filter or interceptor class can be decorated with...
----

is generated as:

<div class="listingblock">
    <div class="content">
        <pre>
            A filter or interceptor class can be decorated with…
        </pre>
    </div>
</div>

instead being generated as a <blockquote> element (as in the online documentation).  The problem is that the text is not wrapped and styled as it would be if it was a <blockquote>.

* The following block:
[source,java]
----
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {

}
----

is also rendered as a <div class="listingblock"> (same as above), and further more, all lines of the source code *except the first one* are indented.

Do you see anything I'm missing or I'm doing wrong ?

Thanks in advance.
Best regards,
Xavier
Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

LightGuardjp
Blockquotes are four underscores, listing blocks are four hyphens, easy one to miss. 


On Tue, Mar 25, 2014 at 10:17 AM, xcoulon [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello,

I'm writing an article (with asciidoctor 1.5.0.preview.3 + awestruct) and I have the following issues with quote blocks and source blocks:

* the following block:
----
A filter or interceptor class can be decorated with...
----

is generated as:

<div class="listingblock">
    <div class="content">
        <pre>
            A filter or interceptor class can be decorated with…
        </pre>
    </div>
</div>

instead being generated as a <blockquote> element (as in the online documentation).  The problem is that the text is not wrapped and styled as it would be if it was a <blockquote>.

* The following block:
[source,java]
----
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {

}
----

is also rendered as a <div class="listingblock"> (same as above), and further more, all lines of the source code *except the first one* are indented.

Do you see anything I'm missing or I'm doing wrong ?

Thanks in advance.
Best regards,
Xavier



If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

xcoulon
Ohhhh ! Thanks for spotting that mistake, Jason ! That fixes the problem with the quote blocks \o/

Do you have any idea why the source code is indented on all lines except the first one ?

Best regards,
Xavier
Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

LightGuardjp
What's the actual source? If the source is indented, then the output will be as well as the source code is wrapped inside of a pre tag.


On Tue, Mar 25, 2014 at 10:39 AM, xcoulon [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Ohhhh ! Thanks for spotting that mistake, Jason ! That fixes the problem with the quote blocks \o/

Do you have any idea why the source code is indented on all lines except the first one ?

Best regards,
Xavier


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1641.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML



--
Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

LightGuardjp
In reply to this post by xcoulon
Hm, looking at the code, sorry I missed it in the first reply, I'm not sure why it would be indented. Is this a regression, or was it the same in 0.1.4?

Sent from Mailbox for iPhone


On Tue, Mar 25, 2014 at 10:40 AM, xcoulon [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Ohhhh ! Thanks for spotting that mistake, Jason ! That fixes the problem with the quote blocks \o/

Do you have any idea why the source code is indented on all lines except the first one ?

Best regards,
Xavier


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1641.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

xcoulon
In reply to this post by LightGuardjp
sure, I understand that, but here's the source I have:

[source,java]
----
@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {

}
----

first line (@Target(...)) is not indented, while other lines are.
Adding a first blank line does not change the generated output.

Xavier

Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

xcoulon
In reply to this post by LightGuardjp
I generated the .html from cmd-line with asciidoctor 1.5.0.preview.3 and 0.1.4 and they are both correct (ie, no extra indentation, as I would expected). 
It looks like there's a problem with the CSS used in the site :-/

Thanks for your help !

Best regards,
Xavier


On 25 Mar 2014, at 18:05, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hm, looking at the code, sorry I missed it in the first reply, I'm not sure why it would be indented. Is this a regression, or was it the same in 0.1.4?

Sent from Mailbox for iPhone


On Tue, Mar 25, 2014 at 10:40 AM, xcoulon [via Asciidoctor :: Discussion] <<a href="x-msg://29/user/SendEmail.jtp?type=node&amp;node=1643&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:

Ohhhh ! Thanks for spotting that mistake, Jason ! That fixes the problem with the quote blocks \o/

Do you have any idea why the source code is indented on all lines except the first one ?

Best regards,
Xavier


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1641.html
To start a new topic under Asciidoctor :: Discussion, email <a href="x-msg://29/user/SendEmail.jtp?type=node&amp;node=1643&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1643.html
To unsubscribe from Indentiation problems with generated Quote and Source, click here.
NAML

Reply | Threaded
Open this post in threaded view
|

Re: Indentiation problems with generated Quote and Source

xcoulon
In reply to this post by LightGuardjp
Oh, I replied too fast... 

I removed the syntax highlighting (prettify) that was configured on the document to see the "raw" content of the generated <pre> element in the Document Inspector in Firefox (well, I could have looked at the page source before, I know..), and it seems that asciidoctor-1.5.0.preview

When generating the file from cmd-line, I get the following HTML fragment with asciidoctor 0.1.4: 
<pre class="highlight"><code class="java language-java">@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {}</code></pre>

When generating the file from cmd-line, I get the following HTML fragment with asciidoctor 1.5.0.preview.3:
<div class="content">
<pre class="highlight"><code class="java language-java">@Target({ ElementType.TYPE, ElementType.METHOD })
@Retention(value = RetentionPolicy.RUNTIME)
@NameBinding
public @interface CustomInterceptorBinding {}</code></pre>

(Both are correct)

Now, when integrated with awestruct 0.5.4.rc3 with asciidoctor-1.5.0.preview.3:, I get this: 

<pre class="highlight"><code class="java language-java">@Target({ ElementType.TYPE, ElementType.METHOD })&#x000A;      @Retention(value = RetentionPolicy.RUNTIME)&#x000A;      @NameBinding&#x000A;      public @interface CustomInterceptorBinding {}</code></pre>
              

See how 6 spaces are inserted after each &#x000A;
Could it be an issue with asciidoctor integration in awestruct ? Or should I look for something else ?

Thanks.
Best regards,
/Xavier



On 25 Mar 2014, at 18:20, Xavier Coulon <[hidden email]> wrote:

I generated the .html from cmd-line with asciidoctor 1.5.0.preview.3 and 0.1.4 and they are both correct (ie, no extra indentation, as I would expected). 
It looks like there's a problem with the CSS used in the site :-/

Thanks for your help !

Best regards,
Xavier


On 25 Mar 2014, at 18:05, LightGuardjp [via Asciidoctor :: Discussion] <[hidden email]> wrote:

Hm, looking at the code, sorry I missed it in the first reply, I'm not sure why it would be indented. Is this a regression, or was it the same in 0.1.4?

Sent from Mailbox for iPhone


On Tue, Mar 25, 2014 at 10:40 AM, xcoulon [via Asciidoctor :: Discussion] <<a href="x-msg://29/user/SendEmail.jtp?type=node&amp;node=1643&amp;i=0" target="_top" rel="nofollow" link="external">[hidden email]> wrote:

Ohhhh ! Thanks for spotting that mistake, Jason ! That fixes the problem with the quote blocks \o/

Do you have any idea why the source code is indented on all lines except the first one ?

Best regards,
Xavier


If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1641.html
To start a new topic under Asciidoctor :: Discussion, email <a href="x-msg://29/user/SendEmail.jtp?type=node&amp;node=1643&amp;i=1" target="_top" rel="nofollow" link="external">[hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Indentiation-problems-with-generated-Quote-and-Source-tp1639p1643.html
To unsubscribe from Indentiation problems with generated Quote and Source, click here.
NAML