o1-labs / ocamlbyexample

Learn Ocaml by reading code examples
https://o1-labs.github.io/ocamlbyexample/
69 stars 4 forks source link

ocamlbyexample 2.0 #16

Open mimoo opened 1 year ago

mimoo commented 1 year ago

I think this library did a faux pas. It shouldn't have separated the comments from the text. It's just too much of a pain to create a chapter due to this. I think it should detect, or have the user provide what type of comment is being used in a file, and extract comment from code.

The other faux pas is how the code is broken in sections, where it meets the comments. I think a better model is to calculate how many space the comment creates, and add linebreaks in the code in correct places to pad.