Am 20.06.2012 07:20, schrieb Lex Trotman:
On 20 June 2012 14:47, Wilhelm<[email protected]>  wrote:
Am 20.06.2012 01:59, schrieb Stuart Rackham:

Thanks for the patch Lex, I've committed it to the trunk:


https://code.google.com/p/asciidoc/source/detail?r=f139415803b0107f84cc61437c180f7262a56bda


Now xml/pdf generation is ok, but in html5 now class=myrole is encluded.

Did I miss something?


Hi,

(x)html(5) from source highlight filter is pre-styled so external
classes shouldn't be applied.  If you really need to do something the
output of source-highlight is in a<div class=listingblock><div
class=content>  which you should be able to detect with CSS.

Mmh, so if I want to apply e.g. a different background color to a special code-block I have to give source-highlight a different ccs-file via the args-filter-argument in asciidoc?

The other point is, that your patch works, but behaves different in titled and untitled listing-blocks: for titled listing-blocks the role-attribute is applied to the <formalpara> enclosing the title as well. I got the xslt working with the role for the verbatim-block but I have no idea how to refer to the role of the enclosing structure.

This is what I use for the

  <xsl:attribute-set name="shade.verbatim.style">
    <xsl:attribute name="background-color">
      <xsl:choose>
        <xsl:when test="@role='code'">#F5F5FF</xsl:when>
        <xsl:when test="@role='command'">#F5FFF5</xsl:when>
        <xsl:otherwise>lightgrey</xsl:otherwise>
      </xsl:choose>
    </xsl:attribute>




Cheers
Lex



Cheers, Stuart

On 19/06/12 22:45, Lex Trotman wrote:

[...]

The "source" style sends it to the source filter, which doesn't
properly use the role attribute for listings without a title. That'd
be a bug :)


Patch attached.

Cheers
Lex




--
Wilhelm

--
You received this message because you are subscribed to the Google Groups
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/asciidoc?hl=en.




--
Wilhelm

--
You received this message because you are subscribed to the Google Groups 
"asciidoc" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/asciidoc?hl=en.

Reply via email to