Skip to content

Commit 923f094

Browse files
chore: prettify XML (#1491)
- fix: update URLs and improve formatting in documentation and code
1 parent a5b5b45 commit 923f094

File tree

2,437 files changed

+139808
-145135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,437 files changed

+139808
-145135
lines changed

etc/defaults.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"update_url": "https://api.github.com/repos/nelson-lang/nelson/releases/latest",
33
"website_url": "https://nelson-lang.github.io/nelson-website/",
44
"issues_url": "https://github.com/nelson-lang/nelson/issues",
5-
"docbook_url": "https://nelson-lang.github.io/nelson-website/help"
5+
"docbook_url": "https://nelson-lang.github.io/nelson-gitbook/releases"
66
}
Lines changed: 85 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,125 +1,119 @@
11
<?xml version="1.0" encoding="UTF-8" ?>
22
<xmldoc>
3-
<copyright>SAME AS NELSON SOFTWARE</copyright>
4-
<language>en_US</language>
5-
<keyword>assert</keyword>
6-
<short_description>Check that condition is true.</short_description>
7-
<syntax>
8-
<syntax_item>assert(x)</syntax_item>
9-
<syntax_item>r = assert(x)</syntax_item>
10-
<syntax_item>[r, msg] = assert(x)</syntax_item>
11-
<syntax_item>assert(x, err_msg)</syntax_item>
12-
<syntax_item>r = assert(x, err_msg)</syntax_item>
13-
<syntax_item>[r, msg] = assert(x, err_msg)</syntax_item>
14-
</syntax>
15-
<param_input>
16-
<param_input_item>
17-
<param_name>x</param_name>
18-
<param_description
3+
<copyright>SAME AS NELSON SOFTWARE</copyright>
4+
<language>en_US</language>
5+
<keyword>assert</keyword>
6+
<short_description>Check that condition is true.</short_description>
7+
<syntax>
8+
<syntax_item>assert(x)</syntax_item>
9+
<syntax_item>r = assert(x)</syntax_item>
10+
<syntax_item>[r, msg] = assert(x)</syntax_item>
11+
<syntax_item>assert(x, err_msg)</syntax_item>
12+
<syntax_item>r = assert(x, err_msg)</syntax_item>
13+
<syntax_item>[r, msg] = assert(x, err_msg)</syntax_item>
14+
</syntax>
15+
<param_input>
16+
<param_input_item>
17+
<param_name>x</param_name>
18+
<param_description
1919
>a logical value to be tested for truthfulness.</param_description>
20-
</param_input_item>
21-
<param_input_item>
22-
<param_name>err_msg</param_name>
23-
<param_description
20+
</param_input_item>
21+
<param_input_item>
22+
<param_name>err_msg</param_name>
23+
<param_description
2424
>a string containing the custom error message to display in case of assertion failure (optional).</param_description>
25-
</param_input_item>
26-
</param_input>
27-
<param_output>
28-
<param_output_item>
29-
<param_name>r</param_name>
30-
<param_description
25+
</param_input_item>
26+
</param_input>
27+
<param_output>
28+
<param_output_item>
29+
<param_name>r</param_name>
30+
<param_description
3131
>a logical value: true if the assertion passes, false otherwise.</param_description>
32-
</param_output_item>
33-
<param_output_item>
34-
<param_name>msg</param_name>
35-
<param_description
32+
</param_output_item>
33+
<param_output_item>
34+
<param_name>msg</param_name>
35+
<param_description
3636
>a string containing the error message. If x == true, then msg == ''. If x == false, then msg contains the assertion failure message.</param_description>
37-
</param_output_item>
38-
</param_output>
39-
<description>
40-
<p><b>assert</b> raises an error if the input value is false.</p>
41-
<p
37+
</param_output_item>
38+
</param_output>
39+
<description>
40+
<p><b>assert</b> raises an error if the input value is false.</p>
41+
<p
4242
>This function also raises an error if the input is not a logical value, ensuring type safety.</p>
43-
<p>When the optional <b
43+
<p>When the optional<b
4444
>err_msg</b> parameter is provided, it will be used as the error message instead of the default message when the assertion fails.</p>
45-
<p
45+
<p
4646
>This is the fundamental assertion function that forms the basis for testing conditions in programs and unit tests.</p>
47-
</description>
48-
<used_function />
49-
<bibliography />
50-
<examples>
51-
<example_item>
52-
<example_item_type>nelson</example_item_type>
53-
<example_item_description
47+
</description>
48+
<used_function />
49+
<bibliography />
50+
<examples>
51+
<example_item>
52+
<example_item_type>nelson</example_item_type>
53+
<example_item_description
5454
>Test assertion failure with custom error message:</example_item_description>
55-
<example_item_data
55+
<example_item_data
5656
runnable="cli"
5757
><![CDATA[try
5858
assert(4 == 3, _('error for comparison.'))
5959
catch ME
6060
disp(['Error: ' ME.message])
6161
end]]></example_item_data>
62-
</example_item>
63-
<example_item>
64-
<example_item_type>nelson</example_item_type>
65-
<example_item_description
62+
</example_item>
63+
<example_item>
64+
<example_item_type>nelson</example_item_type>
65+
<example_item_description
6666
>Test successful assertion:</example_item_description>
67-
<example_item_data
67+
<example_item_data
6868
runnable="cli"
6969
><![CDATA[assert(5 > 3);
7070
disp('Assertion passed: 5 is greater than 3')]]></example_item_data>
71-
</example_item>
72-
<example_item>
73-
<example_item_type>nelson</example_item_type>
74-
<example_item_description
71+
</example_item>
72+
<example_item>
73+
<example_item_type>nelson</example_item_type>
74+
<example_item_description
7575
>Using return values to handle assertion results:</example_item_description>
76-
<example_item_data
76+
<example_item_data
7777
runnable="cli"
7878
><![CDATA[[r, msg] = assert(false, 'This condition is false');
7979
if ~r
8080
disp(['Assertion failed: ' msg])
8181
end]]></example_item_data>
82-
</example_item>
83-
<example_item>
84-
<example_item_type>nelson</example_item_type>
85-
<example_item_description
82+
</example_item>
83+
<example_item>
84+
<example_item_type>nelson</example_item_type>
85+
<example_item_description
8686
>Basic assertion without custom message:</example_item_description>
87-
<example_item_data
87+
<example_item_data
8888
runnable="cli"
8989
><![CDATA[x = 10;
9090
assert(x > 0) % Will pass
9191
assert(x < 0) % Will fail with default message]]></example_item_data>
92-
</example_item>
93-
</examples>
94-
<see_also>
95-
<see_also_item>
96-
<link
97-
linkend="${assert_functions}assert_istrue"
98-
>assert_istrue</link>
99-
</see_also_item>
100-
<see_also_item>
101-
<link
102-
linkend="${assert_functions}assert_isfalse"
103-
>assert_isfalse</link>
104-
</see_also_item>
105-
<see_also_item>
106-
<link
107-
linkend="${assert_functions}assert_isequal"
108-
>assert_isequal</link>
109-
</see_also_item>
110-
<see_also_item>
111-
<link
92+
</example_item>
93+
</examples>
94+
<see_also>
95+
<see_also_item>
96+
<link linkend="${assert_functions}assert_istrue">assert_istrue</link>
97+
</see_also_item>
98+
<see_also_item>
99+
<link linkend="${assert_functions}assert_isfalse">assert_isfalse</link>
100+
</see_also_item>
101+
<see_also_item>
102+
<link linkend="${assert_functions}assert_isequal">assert_isequal</link>
103+
</see_also_item>
104+
<see_also_item>
105+
<link
112106
linkend="${assert_functions}assert_checkerror"
113107
>assert_checkerror</link>
114-
</see_also_item>
115-
</see_also>
116-
<history>
117-
<history_item>
118-
<history_version>1.0.0</history_version>
119-
<history_description>initial version</history_description>
120-
</history_item>
121-
</history>
122-
<authors>
123-
<author_item>Allan CORNET</author_item>
124-
</authors>
108+
</see_also_item>
109+
</see_also>
110+
<history>
111+
<history_item>
112+
<history_version>1.0.0</history_version>
113+
<history_description>initial version</history_description>
114+
</history_item>
115+
</history>
116+
<authors>
117+
<author_item>Allan CORNET</author_item>
118+
</authors>
125119
</xmldoc>

0 commit comments

Comments
 (0)