Skip to content

Add support for AsciiDoc renderer #241

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Apr 12, 2020

Conversation

rdelcampog
Copy link
Contributor

Prerequisites

Put an x into the box(es) that apply:

  • This pull request fixes a bug.
  • This pull request adds a feature.
  • This pull request enhances existing functionality.
  • This pull request introduces breaking change.

For more information, see the Contributing Guide.

Description

This PR adds support for new AsciiDoc Document and Table renderer based on the current Markdown renderer.

Issues Resolved

Closes #240

Checklist

Put an x into all boxes that apply:

Tests

  • I have added tests to cover my changes.
  • All tests pass when I run make test.

Documentation

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.

Code Style

  • My code follows the code style of this project.

@codecov-io
Copy link

codecov-io commented Apr 9, 2020

Codecov Report

Merging #241 into master will increase coverage by 1.00%.
The diff coverage is 93.10%.

@@            Coverage Diff             @@
##           master     #241      +/-   ##
==========================================
+ Coverage   80.36%   81.37%   +1.00%     
==========================================
  Files          30       33       +3     
  Lines        1594     1734     +140     
==========================================
+ Hits         1281     1411     +130     
- Misses        263      271       +8     
- Partials       50       52       +2     
Impacted Files Coverage Δ
internal/format/markdown_document.go 95.74% <ø> (ø)
internal/format/markdown_table.go 94.73% <ø> (ø)
pkg/tmpl/template.go 82.14% <25.00%> (-4.65%) ⬇️
internal/format/asciidoc_table.go 94.87% <94.87%> (ø)
internal/format/asciidoc_document.go 95.83% <95.83%> (ø)
internal/format/factory.go 100.00% <100.00%> (ø)
internal/format/util.go 100.00% <100.00%> (ø)
pkg/tmpl/sanitizer.go 100.00% <100.00%> (ø)
... and 1 more

Copy link
Member

@khos2ow khos2ow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rdelcampog, this looks great. I have some comments below.

@rdelcampog
Copy link
Contributor Author

Thank you @rdelcampog, this looks great. I have some comments below.

Take a look at the indent refactor. Hope it’s good enough.

Copy link
Member

@khos2ow khos2ow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your PR gave me some idea which I already applied to the master, can you please rebase on master and fix conflicts, and also I have some small questions below.

@rdelcampog
Copy link
Contributor Author

Your PR gave me some idea which I already applied to the master, can you please rebase on master and fix conflicts, and also I have some small questions below.

Take a look at my comments. Sorry for that last two commits, VSCode went mad wtf. Maybe I should squash commits :(

@khos2ow
Copy link
Member

khos2ow commented Apr 11, 2020

Take a look at my comments. Sorry for that last two commits, VSCode went mad wtf. Maybe I should squash commits :(

No, you don't need to squash, but what you can do to cleanup this PR is:

git reset --soft HEAD~2
git push origin +feature/asciidoc

Copy link
Member

@khos2ow khos2ow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have some very quick comments below, and please run make docs as well one more time to make sure documents get generated and timestamped properly.

@khos2ow
Copy link
Member

khos2ow commented Apr 11, 2020

Also please delete this extra file internal/format/testdata/asciidoc/table-OnlyInputs.adoc

Copy link
Member

@khos2ow khos2ow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @rdelcampog for the awesome work ❤️

@khos2ow khos2ow merged commit 37375db into terraform-docs:master Apr 12, 2020
@khos2ow khos2ow mentioned this pull request Jun 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add support for AsciiDoctor output format
3 participants