Skip to content

Commit

Permalink
Document template literals.
Browse files Browse the repository at this point in the history
  • Loading branch information
kristapsdz committed Dec 26, 2024
1 parent 452c4a1 commit 8ba6e61
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 2 deletions.
11 changes: 10 additions & 1 deletion man/lowdown-diff.1
Original file line number Diff line number Diff line change
Expand Up @@ -892,7 +892,9 @@ This allows for line-sensitive output media to use control statements
without superfluous blank lines.
.Pp
Expressions consist of
.Li initial[([arg]*)]?[.transform[([arg]*)]?]* ,
.Pp
.Dl initial[([arg]*)]?[.transform[([arg]*)]?]* ,
.Pp
or an initial value accepting optional arguments followed by an optional
series of transforms accepting optional arguments.
If an argument list is empty or not provided, it evaluates to an empty
Expand All @@ -907,6 +909,13 @@ A non-empty list containing the value
.Li true
if all expressions evaluate to non-empty lists, otherwise an empty list.
An empty expression evaluates to an empty list.
.It Li \(dqliteral string\(dq
Evaluates to a singleton list containing the string.
An empty string evaluates to an empty list.
The double quote character may be escaped, such as
.Li \(dqfoo\e\(dqbar\(dq .
.It Cm body
The parsed input document body.
.It canonicalised metadata key
The value for the given metadata key, if found, otherwise an empty list.
.It Cm body
Expand Down
11 changes: 10 additions & 1 deletion man/lowdown.1
Original file line number Diff line number Diff line change
Expand Up @@ -885,7 +885,9 @@ This allows for line-sensitive output media to use control statements
without superfluous blank lines.
.Pp
Expressions consist of
.Li initial[([arg]*)]?[.transform[([arg]*)]?]* ,
.Pp
.Dl initial[([arg]*)]?[.transform[([arg]*)]?]* ,
.Pp
or an initial value accepting optional arguments followed by an optional
series of transforms accepting optional arguments.
If an argument list is empty or not provided, it evaluates to an empty
Expand All @@ -900,6 +902,13 @@ A non-empty list containing the value
.Li true
if all expressions evaluate to non-empty lists, otherwise an empty list.
An empty expression evaluates to an empty list.
.It Li \(dqliteral string\(dq
Evaluates to a singleton list containing the string.
An empty string evaluates to an empty list.
The double quote character may be escaped, such as
.Li \(dqfoo\e\(dqbar\(dq .
.It Cm body
The parsed input document body.
.It canonicalised metadata key
The value for the given metadata key, if found, otherwise an empty list.
.It Cm body
Expand Down
5 changes: 5 additions & 0 deletions regress/template/empty-literalstring.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@

YES


YES
5 changes: 5 additions & 0 deletions regress/template/empty-literalstring.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
$ifdef("")$NO$endif$
$ifdef(not(""))$YES$endif$
$ifdef("".uppercase)$NO$endif$
$ifdef(and("","foo"))$NO$endif$
$ifdef(or("","foo"))$YES$endif$

0 comments on commit 8ba6e61

Please sign in to comment.