Skip to content

Commit

Permalink
Fixup Asciidoc attribute complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
arr2036 committed Aug 16, 2019
1 parent 1f41a85 commit 15e298e
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions doc/antora/modules/howto/pages/modules/mschap.adoc
Expand Up @@ -41,9 +41,9 @@ mschap { ntlm_auth = `/path/to/bin …` }
You need to be careful about setting this command line. There are
several options for the arguments, in particular username and domain:

* `–username=%{User-Name}` - this will fail if you’re using realms or
* `+–username=%{User-Name}+` - this will fail if you’re using realms or
host-based auth
* `–username=%{mschap:User-Name}` - this will fail if using using suffix
* `+–username=%{mschap:User-Name}+` - this will fail if using using suffix
i.e. user@domain

You’ll need to fit this to your local needs.
Expand Down
2 changes: 1 addition & 1 deletion doc/antora/modules/unlang/pages/group.adoc
Expand Up @@ -10,7 +10,7 @@ group {

The `group` statement collects a series of statements into a list.
The default processing sections of the server (`recv Access-Request`,
`send Accounting-Response %{Acct-Status-Type}`, etc.) are also `group`
`+send Accounting-Response %{Acct-Status-Type}+`, etc.) are also `group`
statements. Those sections are given different name for management
reasons, but they behave internally exactly like a `group`.

Expand Down
4 changes: 2 additions & 2 deletions doc/antora/modules/unlang/pages/regex.adoc
Expand Up @@ -49,8 +49,8 @@ case-insensitive fashion.
When the `=~` operator is used, then parentheses in the regular
expression will define variables that contain the matching text.

The special variable `%{0}` contains a copy of the result of
evaluating the data field. The variables `%{1}` and following refer
The special variable `%\{0\}` contains a copy of the result of
evaluating the data field. The variables `%\{1\}` and following refer
to the subsequent matched substring in the regular expression.

Please see the xref:xlat/predefined.adoc#_0[xlat documentation] for
Expand Down
2 changes: 1 addition & 1 deletion doc/antora/modules/unlang/pages/type/string/double.adoc
Expand Up @@ -55,7 +55,7 @@ represent in datastores, or the FreeRADIUS configuration files.
`"foo\"bar\""` +
`"this is a long string"` +
`"this has embedded\ncharacters"` +
`"attribute\tvalue\nusername\t%{User-Name}\nreply-message\t%{reply:Reply-Message}"`
`+"attribute\tvalue\nusername\t%{User-Name}\nreply-message\t%{reply:Reply-Message}"+`
`"The result of 'SELECT * FROM foo WHERE 1' is: %{sql:SELECT * FROM foo WHERE 1}"`

// Licenced under CC-by-NC 4.0.
Expand Down
16 changes: 8 additions & 8 deletions doc/antora/modules/unlang/pages/xlat/alternation.adoc
Expand Up @@ -3,22 +3,22 @@
Alternation syntax similar to that used in Unix shells may also be
used:

`%{​%{Foo}:-bar}`
`+%{%{Foo}:-bar}+`

This code returns the value of `%{Foo}`, if it has a value.
This code returns the value of `+%{Foo}+`, if it has a value.
Otherwise, it returns a literal string bar.

`%{​%{Foo}:-%{Bar}}`
`+%{%{Foo}:-%{Bar}}+`

This code returns the value of `%{Foo}`, if it has a value.
Otherwise, it returns the expansion of `%{Bar}`.
This code returns the value of `+%{Foo}+`, if it has a value.
Otherwise, it returns the expansion of `+%{Bar}+`.

These conditional expansions can be nested to almost any depth, such
as with `%{​%{One}:-%{​%{Two}:-%{Three}}}`.
as with `+%{%{One}:-%{%{Two}:-%{Three}}}+`.

.Examples
`%{%{Stripped-User-Name}:-%{User-Name}}` +
`%{%{Framed-IP-Address}:-<none>}`
`+%{%{Stripped-User-Name}:-%{User-Name}}+` +
`+%{%{Framed-IP-Address}:-<none>}+`

// Copyright (C) 2019 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
// Development of this documentation was sponsored by Network RADIUS SAS.
16 changes: 8 additions & 8 deletions doc/antora/modules/unlang/pages/xlat/attribute.adoc
Expand Up @@ -3,8 +3,8 @@
Attributes in a list may be referenced via one of the following two
syntaxes:

`%{Attribute-Name}` +
`%{<list>:Attribute-Name}`
`+%{Attribute-Name}+` +
`+%{<list>:Attribute-Name}+`

The `<list>:` prefix is optional. If given, it must be a valid
reference to an xref:list.adoc[attribute list].
Expand All @@ -24,15 +24,15 @@ reference is replacedd with an empty string.

.Examples

`%{User-Name}` +
`%{request:User-Name} # same as above` +
`%{reply:User-Name}` +
`%{outer.request:User-Name} # from inside of a TTLS/PEAP tunnel`
`+%{User-Name}+` +
`+%{request:User-Name} # same as above+` +
`+%{reply:User-Name}+` +
`+%{outer.request:User-Name} # from inside of a TTLS/PEAP tunnel+`

Examples of using references inside of a string:

`"Hello %{User-Name}"` +
`"You, %{User-Name} are not allowed to use %{NAS-IP-Address}"`
`+"Hello %{User-Name}"+` +
`+"You, %{User-Name} are not allowed to use %{NAS-IP-Address}"+`

== Additional Variations

Expand Down
4 changes: 2 additions & 2 deletions doc/antora/modules/unlang/pages/xlat/index.adoc
Expand Up @@ -27,7 +27,7 @@ This feature is used to create policies which refer to concepts rather
than to specific values. For example, a policy can be created that
refers to the User-Name in a request, via:

`%{User-Name}`
`+%{User-Name}+`

This string expansion is done only for double-quoted strings and for
the back-tick operator.
Expand All @@ -50,7 +50,7 @@ determine whether or not a space or " character needs to be escaped.

.Example

`Reply-Message := "%{User-Name} with a literal %%`
`+Reply-Message := "%{User-Name} with a literal %%+`

// Copyright (C) 2019 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
// Development of this documentation was sponsored by Network RADIUS SAS.
2 changes: 1 addition & 1 deletion doc/antora/modules/unlang/pages/xlat/module.adoc
Expand Up @@ -12,7 +12,7 @@ expanded to allow for additional flexibility.

.Examples

`%{sql:SELECT name FROM mytable WHERE username = %{User-Name}}`
`+%{sql:SELECT name FROM mytable WHERE username = %{User-Name}}+`

// Copyright (C) 2019 Network RADIUS SAS. Licenced under CC-by-NC 4.0.
// Development of this documentation was sponsored by Network RADIUS SAS.
20 changes: 10 additions & 10 deletions doc/antora/modules/unlang/pages/xlat/predefined.adoc
Expand Up @@ -765,13 +765,13 @@ The md5 of Caipirinha in hex is 14840b6d647c7c98a3e732f833d86ea9

== Miscellaneous Expansions

=== %{0}
=== +%{0}+

Refers to the string that was last used to match a regular expression.
The variables `%{1}` and following refer to the subsequent matched
The variables `+%{1}+` and following refer to the subsequent matched
substring in the regular expression.

=== %{nexttime:<time>}
=== +%{nexttime:<time>}+

Calculate number of seconds until next n hour(`s`), day(`s`), week(`s`), year(`s`).

Expand All @@ -795,35 +795,35 @@ update reply {
You should wait for 2520s
```

=== %{Packet-Type}
=== +%{Packet-Type}+

The packet type (`Access-Request`, etc.)

=== %{Packet-SRC-IP-Address} and %{Packet-SRC-IPv6-Address}
=== +%{Packet-SRC-IP-Address} and %{Packet-SRC-IPv6-Address}+

The source IPv4 or IPv6 address of the packet. See also the expansions
`%{client:ipaddr}` and `%{client:ipv6addr}`. The two expansions
should be identical, unless `%{client:ipaddr}` contains a DNS hostname.

=== %{Packet-DST-IP-Address} and %{Packet-DST-IPv6-Address}
=== +%{Packet-DST-IP-Address} and %{Packet-DST-IPv6-Address}+

The destination IPv4 or IPv6 address of the packet. See also the
expansions `%{listen:ipaddr}` and `%{listen:ipv6addr}`. If the socket
is listening on a "wildcard" address, then these two expansions will be
different, as follows: the `%{listen:ipaddr}` will be the wildcard
address and `%{Packet-DST-IP-Address}` will be the unicast address to
address and `+%{Packet-DST-IP-Address}+` will be the unicast address to
which the packet was sent.

=== %{Packet-SRC-Port} and %{Packet-DST-Port}
=== +%{Packet-SRC-Port} and %{Packet-DST-Port}+

The source/destination ports associated with the packet.

=== %{regex:<capture_group>}
=== +%{regex:<capture_group>}+

Return named subcapture value from previous regex.

If a regular expression match has previously been performed, then the
special variable `%{0}` will contain a copy of the matched portion of
special variable `+%{0}+` will contain a copy of the matched portion of
the input string.

If the server is built with `libpcre` or `libpcre2`, the results of named
Expand Down
2 changes: 1 addition & 1 deletion doc/antora/modules/upgrade/pages/index.adoc
Expand Up @@ -181,7 +181,7 @@ required for the new features in v4.
| `+post-auth+` | `+send Access-Accept+`
| |
| `+preacct+` | `+recv Accounting-Request+`
| `+accounting+` | `+accounting %{Acct-Status-Type}+`
| `+accounting+` | `+accounting %\{Acct-Status-Type\}+`
| `+accounting+` | `+send Accounting-Response+`
| |
| `+recv-coa+` | `+recv CoA-Request+`
Expand Down

0 comments on commit 15e298e

Please sign in to comment.