aws-cloudformation / aws-cloudformation/cloudformation-cli

Documentation generation broken for property pattern?

Open
#983 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
336
Forks
172
Avg merge
3d 5m
Merged PRs (30d)
3

Description

The automatic docs generation is really great to have, thank you!

There does seem to be a small issue with patterns, though. I have a property in my type definition that looks like this:

```json
"Example": {
"description": "An example description for this field.",
"type": "string",
"pattern": "^[a-zA-Z0-9]+$"
}
```

which results in the following Markdown being generated:

```markdown
_Pattern_: ^[a-zA-Z0-9]+$
```

which is rendered like a footnote:

image
...
image

If the `[` character is escaped, like this:

```markdown
_Pattern_: ^\[a-zA-Z0-9]+$
```

then the rendering is more like what I expected to see:

image

It is possible that there are other places that have similar issues; I have not done a deep dive trying to identify other cases.

I'm running version 0.2.28 which appears to be the latest available at the moment.

```shell
$ cfn-cli --version
cfn 0.2.28
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.