GFM: hide kramdown markup on GitLab's markdown
Problem to solve
We've recently introduced kramdown to the docs site, but we're avoiding to use its special markup, e.g., {:.class}
, as GitLab's markdown doesn't render it, therefore, they display in /help
as text.
This would serve as a (kind of urgent) workaround to give us the freedom to use Kramdown while we sort out what to do with /help
.
Proposal
Write a script to hide kramdown things in GitLab's markdown. That could be achieved by hiding anything like {: whatever}
. Kramdown markup always start with {:
and finishes with }
. For more details on what Kramdown does, check our Kramdown guide.
Examples:
-
{:.class}
,{: .class}
,{: .class1 .class2 .class3}
-
{:.class #id}
,{: .class #id}
-
{:toc}
,{:.no_toc}
{: .class #id style="padding-top:0" key="value"}
-
[link]{: #link}
,[link][google-es]{:hreflang="es"}
![image alternative text](/path/to/image.png){: .shadow}
-
{::options parse_block_html="true" /}
,{::options parse_block_html="false" /}
Sometimes the markup is its own line, but there are cases where it goes beside the element it changes. Examples:
### Heading
{: .class #id}
![image alternative text](/path/to/image.png){: .class}
Hello world [link]{: #link}.
Notes
@brodock do you have an idea on how difficult would this be?
cc/ @gl-docsteam @meks