File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -390,6 +390,33 @@ The version number can be of the following forms:
390390- ` X.Y `
391391- ` X.Y.Z `
392392
393+ #### Matching based on the ` os_type ` (since mdx 2.4.0)
394+
395+ Block can be processed or ignored depending on the current
396+ [ ` os_type ` ] ( https://v2.ocaml.org/api/Sys.html#VALos_type ) .
397+
398+ For example, different blocks could be enabled depending on whether we are on
399+ Windows or not:
400+
401+ ```ocaml
402+ #require "unix"
403+ ```
404+
405+ <!-- $MDX os_type<>Win32 -->
406+ ```ocaml
407+ # Unix.nice 0
408+ - : int = 0
409+ ```
410+
411+ <!-- $MDX os_type=Win32 -->
412+ ```ocaml
413+ # Unix.nice 0
414+ Exception: Invalid_argument "Unix.nice not implemented".
415+ ```
416+
417+ The ` os_type ` values should be written in ASCII and are compared case
418+ insensitively.
419+
393420#### Environment variables declaration
394421
395422Environment variables can be declared at the beginning of a block:
You can’t perform that action at this time.
0 commit comments