mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
A new script then parses these json help files into the html help contents, in a standardised manner. Previously, the function help was a bunch of different formats and structures. Now, a custom stylesheet can be applied (and later tweaked!) to format these help. Eg, this commit colors variables and function names in the syntax section for greater readability.
13 lines
879 B
Plaintext
13 lines
879 B
Plaintext
{
|
|
"function": "clamp",
|
|
"description": "Restricts an input value to a specified range.",
|
|
"arguments": [ {"arg":"minimum","description":"the smallest value <i>input</i> is allowed to take."},
|
|
{"arg":"input","description":"a value which will be restricted to the range specified by <i>minimum</i> and <i>maximum</i>"},
|
|
{"arg":"maximum","description":"the largest value <i>input</i> is allowed to take"}],
|
|
"examples": [ { "expression":"clamp(1,5,10)", "returns":"5", "note":"<i>input</i> is between 1 and 10 so is returned unchanged"},
|
|
{ "expression":"clamp(1,0,10)", "returns":"1", "note":"<i>input</i> is less than minimum value of 1, so function returns 1"},
|
|
{ "expression":"clamp(1,11,10)", "returns":"10", "note":"<i>input</i> is greater than maximum value of 10, so function returns 10"}]
|
|
}
|
|
|
|
|