James Madison
James Madison

Reputation: 943

How to get no frame on a table in AsciiDoc on GitHub

I want to make a table in AsciiDoc on GitHub with no frame. My reading of the documentation is that this should work:

[frame="none",options="header"]
|===
| Foo | Bar
| Widget | Gadget
|===

Yet it renders with a frame:

Table continues to have frame even with the option of none.

That frame="none" setting should do it. But it doesn't. I try it without quotes and its the same. The options="header" works fine, so I know the interpreter is seeing the line in brackets and taking some action.

Is it possible that GitHub runs some version of AsciiDoc that is not full featured? If so, is there a site with the details of what does and doesn't work?

Note--this is on our internal corporate instance of GitHub Enterprise, so we may be some versions out of date, or not have some plug-in installed. Is there a special plug-in that does the trick? I don't admin the platform, so is there a way I can check versions and plug-ins in any given GitHub platform as an ordinary developer?

We use AsciiDoc pervasively as our GitHub Wiki language, so changing to another one that does tables better is not an option.

All help appreciated!

Upvotes: 1

Views: 239

Answers (1)

eskwayrd
eskwayrd

Reputation: 4521

GitHub runs an official Asciidoctor to provide a nice rendering. However, they also run the generated HTML and CSS through a filtering process to prevent security issues. During that process, they strip off custom class names from a variety (if not all) elements (I don't know the exact details).

Running asciidoctor on your sample document shows a table that looks like this:

<table class="tableblock frame-none grid-all stretch">

Whereas their process results in a table that looks like:

<table>

From GitHub's perspective, those kinds of changes mean that tables look the same everywhere on the site.

If you need frameless tables, you'll probably find using GitHub Pages a lot easier because you can use custom (or asciidoctor-provided) CSS in that context.

Upvotes: 3

Related Questions