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

Split a submodule into parts with mdx in to-ml mode #148

Closed
NathanReb opened this issue Aug 1, 2019 · 0 comments · Fixed by #155
Closed

Split a submodule into parts with mdx in to-ml mode #148

NathanReb opened this issue Aug 1, 2019 · 0 comments · Fixed by #155

Comments

@NathanReb
Copy link
Contributor

I recently ran into an issue with mdx. I have an .md file containing several ocaml code snippets pointing to different parts of an .ml file. I'm using mdx with --direction to-ml and for some reasons, it gets the first right but doesn't write the other ones to the .ml file.

My first guess was that the first part starts at the file's toplevel but introduces the declaration of a submodule and the subsequent parts all are within that submodule. I thought this could be the reason for the issue because [@@@...] attributes are structure_items of a different part of the AST but I doubt mdx actually relies on that.

You can take a look at the .md file here and the current target file here. Running dune runtest there result in the diff action on the .ml file suggesting to remove anything from [@@@part "2"] (included) to the end of the file. I'm not sure exactly why this is happening. I'll to reproduce that in a simpler example if I find the time to!

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 a pull request may close this issue.

1 participant