diff options
author | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2018-01-18 15:09:28 +0100 |
---|---|---|
committer | Juergen Bocklage-Ryannel <jbocklage-ryannel@luxoft.com> | 2018-01-18 15:09:28 +0100 |
commit | 6e55cc3885ae54c08e71ae8736017adb5b38b759 (patch) | |
tree | 4c82e35459f1442462c69323f1cbb073f1e222ca | |
parent | 5e59b599bba4da36c73b28426079756d17d341dc (diff) | |
download | qtivi-qface-6e55cc3885ae54c08e71ae8736017adb5b38b759.tar.gz |
document parsing of comments into documentation
-rw-r--r-- | docs/extending.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/extending.rst b/docs/extending.rst index a678ea8..5252ed0 100644 --- a/docs/extending.rst +++ b/docs/extending.rst @@ -179,3 +179,19 @@ This is the implicit logical hierarchy taken into account: Typical you place the destination prefix on the module level if your destination depends on the module symbol. For generic templates you would place the destination on the system level. On the system level you can not use child symbols (such as the module) as at this time these symbols are not known yet. +Parsing Documentation Comments +============================== + +The comments are provided as raw text to the template engine. You need to parse using the `parse_doc` tag and the you can inspect the documentation object. + +See below for a simple example + +.. code-block:: html + + {% with doc = property.comment|parse_doc %} + \brief {{doc.brief}} + + {{doc.description}} + {% endwith %} + +Each tag in the JavaDoc styled comment, will be converted into a property of the object returned by `parse_doc`. All lines without a tag will be merged into the description tag. |