summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Allsopp <david.allsopp@metastack.com>2022-09-22 16:47:17 +0200
committerDavid Allsopp <david.allsopp@metastack.com>2022-09-22 15:48:14 +0100
commita73ef7a49c31ac491d4ffec8f927a3c818897ea1 (patch)
tree1994e398c932028181287196e3c8a89b3e319346
parentadcf2cb2c6bea7701d399e7ec8734b55403584a3 (diff)
downloadocaml-a73ef7a49c31ac491d4ffec8f927a3c818897ea1.tar.gz
Merge pull request #11556 from FardaleM/doc_typo
documentation: fix typos (cherry picked from commit 889102d4f35545d7c460f4b73daf128e166bff2f)
-rw-r--r--otherlibs/unix/unix.mli6
-rw-r--r--stdlib/string.mli4
-rw-r--r--stdlib/stringLabels.mli4
-rwxr-xr-xtools/sync_stdlib_docs2
4 files changed, 8 insertions, 8 deletions
diff --git a/otherlibs/unix/unix.mli b/otherlibs/unix/unix.mli
index d5f4cb9839..1498a85e9e 100644
--- a/otherlibs/unix/unix.mli
+++ b/otherlibs/unix/unix.mli
@@ -995,11 +995,11 @@ val close_process_full :
val symlink : ?to_dir: (* thwart tools/sync_stdlib_docs *) bool ->
string -> string -> unit
(** [symlink ?to_dir src dst] creates the file [dst] as a symbolic link
- to the file [src]. On Windows, [to_dir] indicates if the symbolic link
+ to the file [src]. On Windows, [~to_dir] indicates if the symbolic link
points to a directory or a file; if omitted, [symlink] examines [src]
using [stat] and picks appropriately, if [src] does not exist then [false]
- is assumed (for this reason, it is recommended that the [to_dir] parameter
- be specified in new code). On Unix, [to_dir] is ignored.
+ is assumed (for this reason, it is recommended that the [~to_dir] parameter
+ be specified in new code). On Unix, [~to_dir] is ignored.
Windows symbolic links are available in Windows Vista onwards. There are some
important differences between Windows symlinks and their POSIX counterparts.
diff --git a/stdlib/string.mli b/stdlib/string.mli
index cc22af55ad..6ea6e8c5eb 100644
--- a/stdlib/string.mli
+++ b/stdlib/string.mli
@@ -158,14 +158,14 @@ val compare : t -> t -> int
val starts_with :
prefix (* comment thwarts tools/sync_stdlib_docs *) :string -> string -> bool
-(** [starts_with ][~][prefix s] is [true] if and only if [s] starts with
+(** [starts_with ][~prefix s] is [true] if and only if [s] starts with
[prefix].
@since 4.13.0 *)
val ends_with :
suffix (* comment thwarts tools/sync_stdlib_docs *) :string -> string -> bool
-(** [ends_with suffix s] is [true] if and only if [s] ends with [suffix].
+(** [ends_with ][~suffix s] is [true] if and only if [s] ends with [suffix].
@since 4.13.0 *)
diff --git a/stdlib/stringLabels.mli b/stdlib/stringLabels.mli
index ac14715eb4..438ffeb959 100644
--- a/stdlib/stringLabels.mli
+++ b/stdlib/stringLabels.mli
@@ -158,14 +158,14 @@ val compare : t -> t -> int
val starts_with :
prefix (* comment thwarts tools/sync_stdlib_docs *) :string -> string -> bool
-(** [starts_with ][~][prefix s] is [true] if and only if [s] starts with
+(** [starts_with ][~prefix s] is [true] if and only if [s] starts with
[prefix].
@since 4.13.0 *)
val ends_with :
suffix (* comment thwarts tools/sync_stdlib_docs *) :string -> string -> bool
-(** [ends_with ~suffix s] is [true] if and only if [s] ends with [suffix].
+(** [ends_with ][~suffix s] is [true] if and only if [s] ends with [suffix].
@since 4.13.0 *)
diff --git a/tools/sync_stdlib_docs b/tools/sync_stdlib_docs
index edf50a2aed..083c6f0fb7 100755
--- a/tools/sync_stdlib_docs
+++ b/tools/sync_stdlib_docs
@@ -32,7 +32,7 @@ LABLABREGEX="s/\([a-z_]+:([a-z\('])/\(\1/g"
#Remove a tilde if it is followed by a label name and a space or closing
#OCamldoc code section with ]
-TILDEREGEX="s/~([a-z_]+[ \]])/\1/g"
+TILDEREGEX="s/ ~([a-z_]+(?=[ \]]))/ \1/g"
#Indent a non-blank line by two characters, for moreLabels templates
INDENTREGEX="s/^(.+)$/ \1/m"