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
A code block can include <\d+> at the end to indicate code callouts. A code block with this style of callouts needs to be followed by an ordered list with an equal amount of items as called out. Otherwise the docs-builder will throw an error.
magic mode
We will also support 'magic' callouts:
```csharpvarapiKey=newApiKey("<API_KEY>"); // Set up the api keyvarclient=newElasticsearchClient("<CLOUD_ID>", apiKey);
```
Here nothing needs to be numbered and // Set up the api key will be removed from the code block and rendered as the first callout.
This currently works for comments starting with // and # which will cover the majority of languages.
Note the comments have the follow code to be hoisted as a callout.
```csharp// THIS IS NOT A CALLOUTvarapiKey=newApiKey("<API_KEY>"); // THIS ISvarclient=newElasticsearchClient("<CLOUD_ID>", apiKey);
```
This style will allow the callouts to render correctly and for the embedded code to be still syntactically correct.
Activity
[-]Support code callouts (needs issue)[/-][+]Support code callouts[/+][-]Support code callouts[/-][+][Migration tooling] Code callouts[/+]Mpdreamz commentedon Dec 18, 2024
I'm close to implementing this just a note on the syntax
A code block can include
<\d+>at the end to indicate code callouts. A code block with this style of callouts needs to be followed by an ordered list with an equal amount of items as called out. Otherwise the docs-builder will throw an error.magic mode
We will also support 'magic' callouts:
Here nothing needs to be numbered and
// Set up the api keywill be removed from the code block and rendered as the first callout.This currently works for comments starting with
//and#which will cover the majority of languages.Note the comments have the follow code to be hoisted as a callout.
This style will allow the callouts to render correctly and for the embedded code to be still syntactically correct.
bmorelli25 commentedon Dec 18, 2024
This is fantastic! Syntax LGTM. Magic mode will be very nice for short-form callouts.