-
Notifications
You must be signed in to change notification settings - Fork 45
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
spurious ;;
are added
#368
Comments
As of 2.0, it is recommended that MDX toplevel phrases are This example is indeed a bug and we need to fix it. What I'm not sure is what the right fix is, and my first impression is that it would reject your phrase, or rather reject the comment which is neither part of the phrase itself nor part of the toplevel output. Would it be acceptable for you to put the comment inside the phrase in such a fashion: # v (* now v is a mutable vector *);;
- : (int, CCVector.rw) CCVector.t = <abstr> Another option would be to make the comment part of the document rather than the block, if the above syntax doesn't quite suit you: ```ocaml
# (* some previous code *) ...
...
```
Now v is a mutable vector:
```ocaml
# v;;
- : (int, CCVector.rw) CCVector.t = <abstr>
``` |
On Fri, 11 Feb 2022, Nathan Rebours wrote:
This example is indeed a bug and we need to fix it. What I'm not sure is what the right fix is, and my first impression is that it would reject your phrase, or rather reject the comment which is neither part of the phrase itself nor part of the toplevel output.
I'm a bit surprised your initial example used to work in the first place and would consider it a bug on our side to accept it.
Oh, funny. It has always worked for me, by chance it seems :-).
Would it be acceptable for you to put the comment inside the phrase in such a fashion:
```ocaml
# v (* now v is a mutable vector *);;
- : (int, CCVector.rw) CCVector.t = <abstr>
```
I think I'll have to do that indeed.
Another option would be to make the comment part of the document rather than the block, if the above syntax doesn't quite suit you:
That's not very convenient when there's a lot of small code blocks with
comments. I'll probably try the first version instead.
|
With #398 this issue could be solved. |
I have lines like:
and mdx now gives me a diff like:
(to reproduce,
make test
in https://github.com/c-cube/ocaml-containers )The text was updated successfully, but these errors were encountered: