-
Notifications
You must be signed in to change notification settings - Fork 367
Open
Labels
Description
It's been raised by @christinerose when reviewing documentation that it isn't easy to make the difference between the various kinds of code samples found in markdown documents.
Today, we are mainly using using two:
```ocaml
```ocamltop
However, there are more cases
- Hash and double semicolumn stuff
- standalone top-level expression
- top-level expression with environment references
- w/o hash and double semicolumn
- valid code sample, which may be copied into the top-level
- valid code sample with many references, which shouldn't be copied into the top level
- pseudo code, which must not be copied in the top-level
We need to devise a better way to handle this.
Edit:
Additional input in the same lines from @Tchou, #950 (comment):
- w.r.t to code examples, it's ok to give code that, in isolation, does not compile (e.g. because some value is not defined because it was defined three examples above) but syntactically incorrect code such as
val Option.map : …will be confusing for beginners that will try to cut and paste it. Maybe in such case, not use a code formatting box but just somett font?
christinerose
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
📋 Backlog