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.
Summary
Follow-up to #7.
Asciidoctor implementation: https://github.com/elastic/docs?tab=readme-ov-file#callouts
Example: https://www.elastic.co/guide/en/observability/current/apm-open-telemetry-direct.html#apm-connect-open-telemetry-collector
The text was updated successfully, but these errors were encountered: