You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
aio: api page code snippets should be wrapped in <aio-code> #16246
The API template does not render code blocks with the doc viewer's <aio-code> tags as happens when guide authors write <code-example> and <code-tabs>.
Therefore, API code snippets are not pretty-printed and rendered as they are in the guide pages. The likely solution is for dgeni to transform those snippets appropriately.
Tangentially, what would dgeni do if an author used backtick markdown inside a guide page rather than the prescribed <code-example> (or <aio-code>) technique?
I'm submitting a ... (check one with "x")
[ ] bug report => search github for a similar issue or PR before submitting
[x] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question
Current behavior
Unable to style api page code snippets
Expected behavior
To use <aio-code> component for consistency across the site
What dgeni does (Pete correct me if I am wrong) is parsing the code file to extract stuff (no idea how, reflection perhaps) and then with a template, it generates a <code> tag with the content inside.
Not sure if we can put embedded components in those templates.
Activity
[-]aio: api page code snippets[/-][+]aio: api page code snippets should be wrapped in <aio-code>[/+]Foxandxss commentedon Apr 23, 2017
What dgeni does (Pete correct me if I am wrong) is parsing the code file to extract stuff (no idea how, reflection perhaps) and then with a template, it generates a
<code>tag with the content inside.Not sure if we can put embedded components in those templates.
petebacondarwin commentedon Apr 24, 2017
I think we need to change the current rendering for
{@example }inline tags. (Really we should remove them all and just usecode-exampletags.Regarding triple back tick blocks. I am not sure. I'll have to check :-)
petebacondarwin commentedon Apr 29, 2017
It appears to me that all the
{@example ... }blocks are being rendered correctly.I'll fix the triple backticks
build(aio): convert triple backtick blocks to `code-example` tags
Foxandxss commentedon Apr 29, 2017
It is not the fact that we are using {@example ...} correctly. Is stuff like class overview that is generating a custon code tag and not an @example
build(aio): convert triple backtick blocks to `code-example` tags
build(aio): convert triple backtick blocks to `code-example` tags
build(aio): convert triple backtick blocks to `code-example` tags
angular-automatic-lock-bot commentedon Sep 11, 2019
This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.
Read more about our automatic conversation locking policy.
This action has been performed automatically by a bot.