Skip to content
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

Do not escape any characters of a URL #170

Merged
merged 1 commit into from
Jan 17, 2020

Conversation

khos2ow
Copy link
Member

@khos2ow khos2ow commented Jan 17, 2020

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

As part of escaping illegal Markdown characters, if there is any of them in the URL (such as _) they will get escaped too, which makes the URL unusable. (for example https://domain.com/foo\_bar.html is invalid URL).
This PR fixes the issue with introducing NormalizeURLs function which get executed after escape runs to normalize URL back.

Issues Resolved

Fixes #168

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.

@khos2ow khos2ow added this to the v0.8.0 milestone Jan 17, 2020
@khos2ow khos2ow merged commit 6ff46a2 into terraform-docs:master Jan 17, 2020
@khos2ow khos2ow deleted the normalize-url branch January 17, 2020 18:45
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.

Href link with underscore should not be escaped
1 participant