Some info and operation descriptions contain multiline strings. Mustache templating doesn't appear to support indenting multiline strings which limits our ability to handle these properly.
This is how we would want to handle them:
description: |
This is
my
multiline string
But, this is not supported or, at least, it results in only the first line being indented:
description: |
{{{my_multiline_string_var}}}
Expected behavior
Mustache templating should apply indenting to entire multiline string.
Current behavior
Mustache templating only applies indenting/spacing to first line in multiline string.
Multiline descriptions result in the following error:
[ERROR] Error while parsing Markdown front matter.
This can happen if you use special characters in front matter values (try using double quotes around that value).
Possible solution
Since this affects frontmatter only, one idea would be to "split lines" the description and take only the first line as the frontmatter description. The rationale is that it would ostensibly be used primarily for social previews and for descriptions in search engine results. Also, the full description would still be included/rendered in the API doc itself.
Steps to reproduce
Reproduced using the CSPM product API.
Note: this error surfaced after the #320 fix was applied.
Describe the bug
Some
info
and operation descriptions contain multiline strings. Mustache templating doesn't appear to support indenting multiline strings which limits our ability to handle these properly.This is how we would want to handle them:
But, this is not supported or, at least, it results in only the first line being indented:
Expected behavior
Mustache templating should apply indenting to entire multiline string.
Current behavior
Mustache templating only applies indenting/spacing to first line in multiline string.
Multiline descriptions result in the following error:
Possible solution
Since this affects frontmatter only, one idea would be to "split lines" the description and take only the first line as the frontmatter description. The rationale is that it would ostensibly be used primarily for social previews and for descriptions in search engine results. Also, the full description would still be included/rendered in the API doc itself.
Steps to reproduce
Reproduced using the CSPM product API.