Skip to content

Conversation

@Sudrut
Copy link

@Sudrut Sudrut commented Dec 5, 2025

With the plugin one can specify part of code block as "is a syntax notion", "is exposition only", or "is optional" rendered in cppref style.

Enable this feature by adding cxx-mark after the language name of code block's opening fence. When enabled, inside the code block type /*$s:content*/ for syntax notation, /*$expos:content*/ for exposition-only things and /*$opt*/ for an optional mark. The syntax /*$...*/ above is chosen just for convenience.

For example, provided the following DeclDoc component:

<DeclDoc>
  <Decl slot="decl">
    ```cpp cxx-mark
    int main(/*$expos: implementation-defined, see below, or exposition only */) { /*$s:body*/ }
    /* normal C-style comment *//*$opt*/
    ```
  </Decl>

  A main function of implement-defined type, returning `int`.
</DeclDoc>

Output:

image

@vercel
Copy link

vercel bot commented Dec 5, 2025

@Sudrut is attempting to deploy a commit to the microcber's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel
Copy link

vercel bot commented Dec 6, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
cppdoc Error Error Dec 6, 2025 7:48am

@Lancern
Copy link
Collaborator

Lancern commented Dec 6, 2025

Could you also update the development documentation at /development/guide/doc-everything and add usage instructions for your plugin?

@Sudrut
Copy link
Author

Sudrut commented Dec 6, 2025

Could you also update the development documentation at /development/guide/doc-everything and add usage instructions for your plugin?

Ok I will try to add instructions to that page in a section named "Code block inline markers". I couldn't figure out a better name for it.

@Sudrut
Copy link
Author

Sudrut commented Dec 8, 2025

The documentation is added. Sorry I'm terribly sick and will be unable to work for a period of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants