ddot.it/block
ddot.it/block is a command that starts a multi-line block object literal.
Use it to make longer string values with multiple lines nicer to read. Each newline in the block, which separates lines, is included in the value string.
Example for using ddot.it/block and newlines
john ..address.. ddot.it/block
Broadway 1
Berlin
Germany
john ..age.. 11
You can abbreviate ddot.it/block as !!block.
A block body is verbatim: no triples, no metadata and no commands are recognized inside it. Every character is literal content of the value.
Newlines
The general pattern for newlines is
aaa ..bbb.. ddot.it/block?end=END
line-1
line-2
...
line-n-1
line-n
END
that only newlines between line-1 and line-2, line-2 and line-3, …, line-n-1 and line-n are included in the value string. If the block contains only one line, the value of the triples is the same as the value of the single line.
aaa ..bbb.. ddot.it/block?end=123
Hello World
123
is exactly the same as
aaa ..bbb.. Hello World
- Newlines in a block are copied as newline characters (Unicode
\n) into the triple object. - The block content starts on the first line after the block start.
- The block content ends with the last line before the block end.
End Marker
The default block end is a blank line. You can defined a custom block end with ddot.it/block?end=myString, or shorter as !!block?end=myString. The block end marker is not included in the block content. It may not contain newlines or other whitespace characters. The block end marker must be used on its own line.
john ..address.. ddot.it/block?end=THE-END
Broadway 1
Berlin
Germany
THE-END
john ..age.. 11
Meta
A block opener must be the last thing on its line, so metadata cannot follow it there. It goes on the line after the block ends, in the ordinary inline form:
john ..address.. ddot.it/block
Broadway 1
Berlin
Germany
,, ..year.. 2123
The logical line resumes after the block: a line starting with ,, continues the triple whose object the block filled, so this attaches year = 2123 to john ..address.. … exactly as if the block had been a plain one-line object. Several pairs separate with ;; as usual:
,, ..year.. 2123 ;; ..source.. census
For a lot of metadata the multi-line ,, block form works too, and means the same thing:
john ..address.. ddot.it/block
Broadway 1
Berlin
Germany
,,
..year.. 2123
,,
If you do write something after the opener, it is not a block: the command is then ordinary text in the field holding it. So
john ..address.. ddot.it/block ,, ..year.. 2123
is the triple (john, address, ddot.it/block) with the metadata year = 2123 — the following lines are not swallowed. The same resumption applies wherever a block sits: after a block subject the next line may continue with ..relation.. object, and after a block meta object with ;; ..next.. pair. See block-continuation in the Parse Specification for the exact rule.
Further Reading
See the User Guide and the Parse Specification for the full reference.