diff --git a/erts/doc/references/erl_cmd.md b/erts/doc/references/erl_cmd.md index 88c576e98f32..648e1b0c93b2 100644 --- a/erts/doc/references/erl_cmd.md +++ b/erts/doc/references/erl_cmd.md @@ -114,7 +114,7 @@ described in the corresponding application documentation. The file `FileName` is to be a plain text file and can contain comments and command-line arguments. A comment begins with a `#` character and continues - until the next end of line character. Backslash (\\\\) is used as quoting + until the next end of line character. Backslash (\\) is used as quoting character. All command-line arguments accepted by `erl` are allowed, also flag `-args_file FileName`. Be careful not to cause circular dependencies between files containing flag `-args_file`, though. diff --git a/erts/doc/references/erlsrv_cmd.md b/erts/doc/references/erlsrv_cmd.md index 0933d2703b79..b533e50d398c 100644 --- a/erts/doc/references/erlsrv_cmd.md +++ b/erts/doc/references/erlsrv_cmd.md @@ -161,7 +161,7 @@ The following parameters can be specified for each Erlang service: shows up as the service description in the Windows service manager. [](){: #001 } The naming of the service in a system that uses release handling -must follow the convention _NodeName_\__Release_, where _NodeName_ is the first +must follow the convention *NodeName_Release*, where _NodeName_ is the first part of the Erlang node name (up to, but not including the "@") and _Release_ is the current release of the application. diff --git a/erts/doc/references/start_erl_cmd.md b/erts/doc/references/start_erl_cmd.md index 8fb9f6fa5cb3..4a2ddb3ebfa1 100644 --- a/erts/doc/references/start_erl_cmd.md +++ b/erts/doc/references/start_erl_cmd.md @@ -28,8 +28,8 @@ Windows). Although there are programs with the same name on other platforms, their functionality is different. This program is distributed both in compiled form (under -`\\erts-\\bin`) and in source form (under -`\\erts-\\src`). The purpose of the source code is to +`\erts-\bin`) and in source form (under +`\erts-\src`). The purpose of the source code is to ease customization of the program for local needs, such as cyclic restart detection. There is also a "make"-file, written for the `nmake` program distributed with Microsoft Visual C++. This program can, however, be compiled @@ -55,10 +55,10 @@ The `start_erl` program in its original form recognizes the following options: - **`-reldir `** - Mandatory if environment variable `RELDIR` is not specified and no `-rootdir` option is specified. Tells `start_erl` where the root of the release tree is located in the file system (typically - `\\releases`). The `start_erl.data` file is expected to be + `\releases`). The `start_erl.data` file is expected to be located in this directory (unless otherwise specified). If only option `-rootdir` is specified, the directory is assumed to be - `\\releases`. + `\releases`. - **`-rootdir `** - Mandatory if `-reldir` is not specified and no `RELDIR` exists in the environment. This specifies the Erlang diff --git a/lib/snmp/doc/references/snmpc_cmd.md b/lib/snmp/doc/references/snmpc_cmd.md index 52ebe33feb74..9a940abdec91 100644 --- a/lib/snmp/doc/references/snmpc_cmd.md +++ b/lib/snmp/doc/references/snmpc_cmd.md @@ -21,18 +21,22 @@ limitations under the License. SNMP MIB compiler frontend +## Synopsis + +``` +snmpc [options] file.mib | file.bin +``` + ## Description The `snmpc` program provides a way to run the SNMP MIB compiler of the Erlang system. -## snmpc \[options] file.mib | file.bin - -`snmpc` compile a SNMP MIB file, see [compile/1,2](`snmpc:compile/1`) for more -info. +`snmpc` compiles an SNMP MIB file. See [compile/1,2](`snmpc:compile/1`) for more +information. -It can also be used to generate a header file (.hrl) with definitions of Erlang -constants for the objects in the MIB, see [mib_to_hrl/1](`snmpc:mib_to_hrl/1`). +It can also be used to generate a header file (`.hrl`) with definitions of Erlang +constants for the objects in the MIB. See [mib_to_hrl/1](`snmpc:mib_to_hrl/1`). [](){: #options } diff --git a/make/markdown_to_man.escript b/make/markdown_to_man.escript index d1508ee21c6a..8a5999dc3043 100755 --- a/make/markdown_to_man.escript +++ b/make/markdown_to_man.escript @@ -136,11 +136,12 @@ format_one({ul,_,Ul}) -> format_ul(Ul). format_p(Is0) -> - Is = [format_p_item(I) || I <- Is0], - [~".PP\n",Is,$\n]. + Text0 = iolist_to_binary([format_p_item(I) || I <- Is0]), + Text = string:trim(Text0, leading), + [~".PP\n",Text,$\n]. format_p_item({code,_,Text}) -> - [~B"\fI",Text,~B"\fR"]; + [~B"\fI",format_p_item(Text),~B"\fR"]; format_p_item({em,_,Text}) -> [~B"\fB",format_p_item(Text),~B"\fR"]; format_p_item({i,_,Text}) -> @@ -150,14 +151,14 @@ format_p_item([H|T]) -> format_p_item([]) -> []; format_p_item(Text) when is_binary(Text) -> - Text. + escape_backslashes(Text). format_pre(Ps0) -> Ps = [format_pre_item(P) || P <- Ps0], [~".IP\n.nf\n",Ps,$\n,~".fi\n"]. format_pre_item({code,_,Text}) -> - Text. + escape_backslashes(Text). format_ul(UL) -> [format_ul_item(I) || I <- UL]. @@ -200,3 +201,8 @@ strip_formatting(<<".",_/binary>> = Bin) -> [~B"\&",Bin]; strip_formatting(Bin) when is_binary(Bin) -> Bin. + +escape_backslashes(Text) when is_list(Text) -> + escape_backslashes(iolist_to_binary(Text)); +escape_backslashes(Text) when is_binary(Text) -> + binary:replace(Text, ~B"\", ~B"\\", [global]).