From: Vsevolod Stakhov Date: Mon, 6 Jan 2014 09:20:36 +0000 (+0000) Subject: Fix markdown. X-Git-Tag: 0.6.7~21 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=886a059f9beb85767b9162065bd15b20805fca95;p=rspamd.git Fix markdown. --- diff --git a/doc/markdown/configuration/ucl.md b/doc/markdown/configuration/ucl.md index 15fda9369..54f410d8c 100644 --- a/doc/markdown/configuration/ucl.md +++ b/doc/markdown/configuration/ucl.md @@ -11,7 +11,7 @@ For example, you can write the same configuration in the following ways: * in nginx like: -```nginx +~~~nginx param = value; section { param = value; @@ -31,11 +31,11 @@ section { } } } -``` +~~~ * or in JSON: -```json +~~~json { "param": "value", "param1": "value1", @@ -53,7 +53,7 @@ section { ] } } -``` +~~~ ## Improvements to the json notation. @@ -63,72 +63,72 @@ There are various things that make ucl configuration more convenient for editing * Braces are not necessary to enclose a top object: it is automatically treated as an object: -```json +~~~json "key": "value" -``` +~~~ is equal to: -```json +~~~json {"key": "value"} -``` +~~~ * There is no requirement of quotes for strings and keys, moreover, `:` may be replaced `=` or even be skipped for objects: -```nginx +~~~nginx key = value; section { key = value; } -``` +~~~ is equal to: -```json +~~~json { "key": "value", "section": { "key": "value" } } -``` +~~~ * No commas mess: you can safely place a comma or semicolon for the last element in an array or an object: -```json +~~~json { "key1": "value", "key2": "value", } -``` +~~~ ### Automatic arrays creation * Non-unique keys in an object are allowed and are automatically converted to the arrays internally: -```json +~~~json { "key": "value1", "key": "value2" } -``` +~~~ is converted to: -```json +~~~json { "key": ["value1", "value2"] } -``` +~~~ ### Named keys hierarchy UCL accepts named keys and organize them into objects hierarchy internally. Here is an example of this process: -```nginx +~~~nginx section "blah" { key = value; } section foo { key = value; } -``` +~~~ is converted to the following object: -```nginx +~~~nginx section { blah { key = value; @@ -137,19 +137,19 @@ section { key = value; } } -``` +~~~ Plain definitions may be more complex and contain more than a single level of nested objects: -```nginx +~~~nginx section "blah" "foo" { key = value; } -``` +~~~ is presented as: -```nginx +~~~nginx section { blah { foo { @@ -157,7 +157,7 @@ section { } } } -``` +~~~ ### Convenient numbers and booleans @@ -178,25 +178,25 @@ UCL supports different style of comments: * multiline: `/* ... */` Multiline comments may be nested: -```c +~~~c # Sample single line comment /* some comment /* nested comment */ end of comment */ -``` +~~~ ### Macros support UCL supports external macros both multiline and single line ones: -```nginx +~~~nginx .macro "sometext"; .macro { Some long text .... }; -``` +~~~ There are two internal macros provided by UCL: * `include` - read a file `/path/to/file` or an url `http://example.com/file` and include it to the current place of @@ -224,13 +224,13 @@ to change in future libucl releases. ### Multiline strings UCL can handle multiline strings as well as single line ones. It uses shell/perl like notation for such objects: -``` +~~~ key = <