yo1995
(Ting Chen)
1
In our internal docs we used HTML <table> tags such as
<table>
<tr><th>Heading example</th></tr>
<tr><td>Some value</td></tr>
</table>
When DocC generates the archive and webpages, they seem to be missing. Then I tried to swap them with Markdown-syntax tables, and they display correctly.
Questions:
- Is the raw HTML
<table> tag supported in DocC?
- Does DocC support other HTML tags?
Thank you.
bbrk24
2
Raw HTML is not supported in docc, as I understand it. There was discussion at some point for special-casing <sup> and <sub>, but that's it.
1 Like
stevapple
(YR Chen)
3
As far as I can tell, DocC will strip most HTML tags (as well as their children), and for other tags children can be rendered as plain text without styling. I've written a few special rules to automatically transform common HTML tags into Markdown, including <table>.
yo1995
(Ting Chen)
4
Thanks for your answers!
It would be helpful if the DocC team can provide a list of supported syntax for Apple's documentation markup so there's less guessing game. 
The current source of truth for this is here: Formatting your documentation content. But I agree it doesn't do a great job of fully specifying the syntax. @ronnqvist and @sofiaromorales have both been spending time recently thinking about how to improve the overall documentation story for Swift-DocC and that page has definitely come under scrutiny.
If there are specific things you'd like to see improved, filing a GitHub issue on the repo is always appreciated.
But yes, as has been written above in this thread, DocC doesn't support HTML markup, with the exception of HTML comments.
2 Likes