Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Odoc markup #1465

Merged
merged 8 commits into from
Jun 24, 2024
Merged

Odoc markup #1465

merged 8 commits into from
Jun 24, 2024

Conversation

dlesbre
Copy link
Contributor

@dlesbre dlesbre commented May 3, 2024

Add syntax color to:

  • odoc tables (added in odoc 2.3),
  • odoc headings with labels ({1:label heading})
  • code block with attributes (used by mdx).
  • also color {@ocaml attr[ blocks as ocaml instead of verbatim (previously only @{[ block were colored as ocaml).

Here is an example test comment:

(**

{1:label section}

{table
 {tr
  {td {b hello}}
  {th heading}
 }
}

{t
  | hello | there | header | text |
  | --- | :-- | :---: | --:
  | a | b | c | d
}

{@ocaml skip[
   let x = 5
]}

{@notocaml someattribute[
    this is just colored as verbatim
]}

*)

@rgrinberg
Copy link
Contributor

@mnxn could you have a look?

Copy link
Collaborator

@mnxn mnxn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay. This looks good.

@smorimoto smorimoto merged commit e11de70 into ocamllabs:master Jun 24, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants