Commit Graph

13 Commits

Author SHA1 Message Date
Khosrow Moossavi
43f69d337f fix: Preserve asterisk list in header and fix escaping (#179) 2020-01-30 18:47:32 -05:00
Khosrow Moossavi
bf38a75fe3 fix: Add newline between code block and trailing lines (#184) 2020-01-30 18:09:45 -05:00
Khosrow Moossavi
6ff46a26b1 fix: Do not escape any characters of a URL (#170) 2020-01-17 13:45:48 -05:00
Khosrow Moossavi
82e87aa264 fix: Do not escape strings inside code blocks (#155) 2020-01-12 15:20:12 -05:00
Khosrow Moossavi
b3112d135a fix: Read leading module header from main.tf (#154)
Supported comment formats is:
- jsdoc, c or java-like multi-line comment `/** **/`

BREAKING CHANGE: - In the JSON format respone, module "Comment" has been renamed to module `header`.
2020-01-10 16:40:48 -05:00
Khosrow Moossavi
a6193849c4 fix: Read leading comment lines if description is not provided (#151)
Supported comment formats are:

- multi-lines start with `#` comment format
- multi-lines start with `//` comment format

Unsupported comments formats is:

- jsdoc, c or java-like multi-line comment `/** **/`
2020-01-07 21:49:56 -05:00
Khosrow Moossavi
ce32bf10a9 feat: Show 'providers' information (#140)
* Show 'providers' information

* Fix for unsorted providers list

BREAKING CHANGE: - With Terraform 0.12 the information about `providers` being used in the module will be generated by default. This will cause the first generation of documents with the latest release of `terraform-docs` binary be slightly different than before, now there will be `Providers` section in Markdown and `providers` block in JSON. You can ignore this by using new `--no-providers` flag if you choose to.

Originally-Authored-By: Thomas Alton <thomas.alton@gmail.com>
Original-Pull-Request: #113
2020-01-03 18:33:08 -05:00
Thomas Alton
b8da8c5020 feat: Support Terraform 0.12.x configuration (#113)
* Support 0.12 configuration

* Move code out of GOPATH for CircleCI

* cleanup

* Rename 'variables' back to 'input' just for now

* Normalizing 'print.s.Settings' usage

* Normalize settings continued

* Remove '--providers' functionality for now

* Adjust 'commands' based on moarta's changes

* Adjust 'pkg/doc' based on moarta's changes

* Adjust 'pkg/print/json' based on moarta's changes

* Fix json tests

* don't trim whitespaces from .tf files

* Adjust 'pkg/print/pretty' based on moarta's changes

* Fix pretty tests

* don't trim whitespaces from .golden files

* Show 'n/a' for empty description for 'pretty'

* Show 'any' if type of input variable is missing

* Adjust 'pkg/print/markdown/document' based on moarta's changes

* Fix document tests

* move back vendor files

* Adjust 'pkg/print/markdown/table' based on moarta's changes

* fix lint issue

* Fix table tests

* figure out input type based on default value if tpye not explicitly defined

* don't escape ( ) [ ] { }, as they don't cause any issue

Authored-by: Thomas Alton <thomas.alton@gmail.com>
Co-authored-by: Khosrow Moossavi <khos2ow@gmail.com>
2019-12-20 15:07:29 -05:00
Hugues Malphettes
ab42f0d097 Code blocks support for all formats. Single line break support (#123)
*  HTML-ize code blocks inside a markdown table. Single line break.

 Add support for embedding markdown code blocks inside markdown tables

 Add support for single-line breaks: when the line ends with 2 spaces, place
 a single <br>.

* Fix the testsuite, todo improve the escape code for document

* Add the WithIndent testdata
2019-12-11 14:48:49 -05:00
Khosrow Moossavi
f0a7d374a5 Enhance Makefile and add editorconfig (#115) 2019-09-23 20:27:11 +02:00
Khosrow Moossavi
9f63bdf484 Escape pipe character when generating Markdown (#114) 2019-06-28 19:19:08 +02:00
Martin Etmajer
18939caf6d Unify default values of inputs (#97) 2018-12-13 08:59:30 +01:00
Martin Etmajer
750d500622 Move Terraform test configuration to folder 'examples'. 2018-12-02 19:44:21 +01:00