Skip to content

All sources of the header requires multi-line comment #283

@antrov

Description

@antrov

Describe the bug

Docs says:

The whole file content is being extracted as module header when extracting from .adoc, .md or .txt. But to extract header from .tf file you need to use following javascript, c or java like multi-line comment:

In practice, every source of the header (md, adoc, txt) is not attached as a header when content is no wrapped in multiline comment.

To Reproduce

Steps to reproduce the behavior:

  1. Clone terraform-docs repo
  2. Run terraform-docs md . --header-from=doc.md > README.MD in examples folder
  3. README.MD has no header
  4. Wrap conent of doc.md in comment
  5. Rerun command -> header is on his place

Expected behavior

Markdown header should be attached to result docs without multiline comment.

Version information:

  • terraform-docs version v0.0.0- v0.9.1 darwin/amd64 BuildDate: 2020-04-03T02:30:49+0100
  • macOS 10.15.5

Additional context

N/A

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions