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

Strip whitespaces from the end of the metadata field #3

Merged
merged 2 commits into from
Dec 10, 2021

Conversation

Julow
Copy link
Contributor

@Julow Julow commented Dec 10, 2021

Spaces at this locations are not meant by the user to be data and require special handlings in tools like Mdx and OCamlformat:

(** {@ocaml foo=bar[ ]} *)
(** {@ocaml foo=bar [ ]} *)
(** {@ocaml foo=bar
      [ ]} *)
(** {@ocaml
      foo=bar
      [ ]} *)

All should parse to the same AST.

Spaces at this locations are not meant by the user to be data and
require special handlings in tools like Mdx and OCamlformat.
Copy link

@Leonidas-from-XIV Leonidas-from-XIV left a comment

Choose a reason for hiding this comment

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

This is exactly the change that I appreciate in MDX (since it free's me from stripping whitespace while making sure that other tools parsing odoc behave consistently) and as someone who would write odoc metadata (since I would not expect the whitespace to be meaningful)!

@jonludlam
Copy link
Collaborator

Thanks @Julow !

@jonludlam jonludlam merged commit d7a5963 into ocaml-doc:main Dec 10, 2021
jonludlam added a commit to jonludlam/opam-repository that referenced this pull request Dec 11, 2021
CHANGES:

- New syntax to allow associating metadata with code blocks
  (@Julow, ocaml-doc/odoc-parser#2, ocaml-doc/odoc-parser#3)
jonludlam pushed a commit to jonludlam/odoc-parser that referenced this pull request Feb 22, 2023
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.

3 participants