diff --git a/docs/reference.md b/docs/reference.md
index 448af70..84e9024 100644
@@ -81,51 +81,49 @@
The generator will automatically search for this file and read the
options from it. The file format is as follows:
-- Lines starting with '\#' or '//' are regarded as comments.
+- Lines starting with `#` or `//` are regarded as comments.
- Blank lines are ignored.
- All other lines should start with a field name pattern, followed by
- one or more options. For example: *\"MyMessage.myfield max_size:5
+ one or more options. For example: `MyMessage.myfield max_size:5 max_count:10`.
- The field name pattern is matched against a string of form
- *'Message.field'*. For nested messages, the string is
- *'Message.SubMessage.field'*. A whole file can be matched by its
- filename *'dir/file.proto'*.
+ `Message.field`. For nested messages, the string is
+ `Message.SubMessage.field`. A whole file can be matched by its
+ filename `dir/file.proto`.
- The field name pattern may use the notation recognized by Python
- - `*` matches any part of string, like 'Message.\*' for all
+ - `*` matches any part of string, like `Message.*` for all
- `?` matches any single character
- - `[seq]` matches any of characters 's', 'e' and 'q'
+ - `[seq]` matches any of characters `s`, `e` and `q`
- `[!seq]` matches any other character
-- The options are written as *'option_name:option_value'* and
+- The options are written as `option_name:option_value` and
several options can be defined on same line, separated by
- Options defined later in the file override the ones specified
earlier, so it makes sense to define wildcard options first in the
file and more specific ones later.
-To debug problems in applying the options, you can use the *-v* option
+To debug problems in applying the options, you can use the `-v` option
for the nanopb generator. With protoc, plugin options are specified with
nanopb_generator -v message.proto # When invoked directly
protoc ... --nanopb_opt=-v --nanopb_out=. message.proto # When invoked through protoc
Protoc doesn't currently pass include path into plugins. Therefore if
-your *.proto* is in a subdirectory, nanopb may have trouble finding the
-associated *.options* file. A workaround is to specify include path
+your `.proto` is in a subdirectory, nanopb may have trouble finding the
+associated `.options` file. A workaround is to specify include path
separately to the nanopb plugin, like:
protoc -Isubdir --nanopb_opt=-Isubdir --nanopb_out=. message.proto
If preferred, the name of the options file can be set using generator
### Defining the options on command line
-The nanopb_generator.py has a simple command line option *-s
-OPTION:VALUE*. The setting applies to the whole file that is being
+The nanopb_generator.py has a simple command line option `-s OPTION:VALUE`.
+The setting applies to the whole file that is being processed.
### Defining the options in the .proto file
@@ -164,7 +162,7 @@
Type used for storing byte-sized data, such as raw binary input and
-bytes-type fields. :
typedef uint_least8_t pb_byte_t;
@@ -185,7 +183,7 @@
Type used to store the type of each field, to control the
-encoder/decoder behaviour. :
typedef uint_least8_t pb_type_t;
@@ -370,7 +368,7 @@
In the normal case, the function pointers are `NULL` and the decoder and
encoder use their internal implementations. The internal implementations
-assume that *arg* points to a [pb_field_iter_t](#pb_field_iter_t)
+assume that `arg` points to a [pb_field_iter_t](#pb_field_iter_t)
that describes the field in question.
To implement custom processing of unknown fields, you can provide
@@ -524,7 +522,7 @@
The options that can be defined are:
-* `PB_ENCODE_DELIMITED`: Indicate the length of the message by prefixing with a varint-encoded length. Compatible with *parseDelimitedFrom* in Google's protobuf library.
+* `PB_ENCODE_DELIMITED`: Indicate the length of the message by prefixing with a varint-encoded length. Compatible with `parseDelimitedFrom` in Google's protobuf library.
* `PB_ENCODE_NULLTERMINATED`: Indicate the length of the message by appending a zero tag value after it. Supported by nanopb decoder, but not by most other protobuf libraries.