Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7f6f997

Browse files
committed
Merge branch 'develop' into v4
2 parents 6613f1c + 8eb8aba commit 7f6f997

6 files changed

Lines changed: 14 additions & 12 deletions

File tree

docs/reference/functions/createUnit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Parameter | Type | Description
2929
--------- | ---- | -----------
3030
`name` | string | The name of the new unit. Must be unique. Example: 'knot'
3131
`definition` | string, Unit | Definition of the unit in terms of existing units. For example, '0.514444444 m / s'.
32-
`options` | Object | (optional) An object containing any of the following properties:
32+
`options` | Object | (optional) An object containing any of the following properties:</br>- `prefixes {string}` "none", "short", "long", "binary_short", or "binary_long". The default is "none".</br>- `aliases {Array}` Array of strings. Example: ['knots', 'kt', 'kts']</br>- `offset {Numeric}` An offset to apply when converting from the unit. For example, the offset for celsius is 273.15. Default is 0.
3333

3434
### Returns
3535

docs/reference/functions/parse.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ math.parse([expr1, expr2, expr3, ...], options)
2323
Parameter | Type | Description
2424
--------- | ---- | -----------
2525
`expr` | string &#124; string[] &#124; Matrix | Expression to be parsed
26-
`options` | {nodes: Object&lt;string, Node&gt;} | Available options: - `nodes` a set of custom nodes
26+
`options` | {nodes: Object&lt;string, Node&gt;} | Available options:</br>- `nodes` a set of custom nodes
2727

2828
### Returns
2929

docs/reference/functions/qr.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ math.qr(A);
1717

1818
Parameter | Type | Description
1919
--------- | ---- | -----------
20-
`A` | Matrix &#124; Array | A two dimensional matrix or array
20+
`A` | Matrix &#124; Array | A two dimensional matrix or array for which to get the QR decomposition.
2121

2222
### Returns
2323

2424
Type | Description
2525
---- | -----------
26-
{Q: Array &#124; Matrix, R: Array &#124; Matrix} | Q: the orthogonal
26+
{Q: Array &#124; Matrix, R: Array &#124; Matrix} | Q: the orthogonal matrix and R: the upper triangular matrix
2727

2828

2929
## Examples

lib/type/unit/function/createUnit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ function factory (type, config, load, typed) {
3434
* @param {string} name The name of the new unit. Must be unique. Example: 'knot'
3535
* @param {string, Unit} definition Definition of the unit in terms of existing units. For example, '0.514444444 m / s'.
3636
* @param {Object} options (optional) An object containing any of the following properties:
37-
* prefixes {string} "none", "short", "long", "binary_short", or "binary_long". The default is "none".
38-
* aliases {Array} Array of strings. Example: ['knots', 'kt', 'kts']
39-
* offset {Numeric} An offset to apply when converting from the unit. For example, the offset for celsius is 273.15. Default is 0.
37+
* - `prefixes {string}` "none", "short", "long", "binary_short", or "binary_long". The default is "none".
38+
* - `aliases {Array}` Array of strings. Example: ['knots', 'kt', 'kts']
39+
* - `offset {Numeric}` An offset to apply when converting from the unit. For example, the offset for celsius is 273.15. Default is 0.
4040
*
4141
* See also:
4242
*

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@
139139
"mathjs": "./bin/cli.js"
140140
},
141141
"engines": {
142-
"node": ">= 0.1"
142+
"node": ">= 4"
143143
},
144144
"bugs": {
145145
"url": "https://github.com/josdejong/mathjs/issues"

tools/docgenerator.js

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,9 +246,11 @@ function generateDoc(name, code) {
246246
annotation.description = annotation.description.substring(index + 1).trim();
247247
}
248248

249-
// multi line description
250-
while (exists() && !empty() && /^\s{6}/.test(line)) {
251-
annotation.description += ' ' + line.trim();
249+
// multi line description (must be non-empty and not start with @param or @return)
250+
while (exists() && !empty() && !/^\s*@/.test(line)) {
251+
var lineTrim = line.trim()
252+
var separator = (lineTrim[0] === '-' ? '</br>' : ' ');
253+
annotation.description += separator + lineTrim;
252254
next();
253255
}
254256

@@ -272,7 +274,7 @@ function generateDoc(name, code) {
272274
};
273275

274276
// multi line description
275-
while (exists() && !empty() && /^\s{6}/.test(line)) {
277+
while (exists() && !empty() && !/^\s*@/.test(line)) {
276278
doc.returns.description += ' ' + line.trim();
277279
next();
278280
}

0 commit comments

Comments
 (0)