Source code highlighting inside table

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

Source code highlighting inside table

wimalopaan
I wonder, if source-highlighting should be possible inside a table like this:

.Tabelle
[cols="asciidoc,>"]
|====
|[source,cpp]
----
int a;
---- 
| link:test.cc[icon:tags[]]
|====

If I try this I get the source block as verbatim text ...

Any hints?

Reply | Threaded
Open this post in threaded view
|

Re: Source code highlighting inside table

wimalopaan
This used to work with (original) asciidoc ...

Any hints?

Reply | Threaded
Open this post in threaded view
|

Re: Source code highlighting inside table

mojavelinux
Administrator
In reply to this post by wimalopaan
The column specification should be "a" not "asciidoc". I only implemented the single-letter notation in Asciidoctor, not the full word.

.Tabelle
[cols="a,>"]
|====
|
[source,cpp]
----
int a;
----
|link:test.cc[icon:tags[]]
|====

I also recommend always starting AsciiDoc table content on it's own line to make it clearer for both humans and tooling (though technically it works when on the same line as the cell separator).

-Dan


On Mon, Jan 19, 2015 at 2:50 AM, wimalopaan [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I wonder, if source-highlighting should be possible inside a table like this:

.Tabelle
[cols="asciidoc,>"]
|====
|[source,cpp]
----
int a;
---- 
| link:test.cc[icon:tags[]]
|====

If I try this I get the source block as verbatim text ...

Any hints?




If you reply to this email, your message will be added to the discussion below:
http://discuss.asciidoctor.org/Source-code-highlighting-inside-table-tp2681.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: Source code highlighting inside table

wimalopaan
Thank you very much!