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

Issue 11 be compatible with rails view annotation comments #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

eoinkelly
Copy link

@eoinkelly eoinkelly commented Oct 13, 2023

If:

config.action_view.annotate_rendered_view_with_filenames = true

is set in Rails then each rendered view and partial will have a comment
at the top like:

<!-- BEGIN app/views/thing/index.html.erb -->

When this comment is present before the doctype, it causes the HTML to be
invalid in a way that is not useful so we remove it.

Resolves #11

If:

    config.action_view.annotate_rendered_view_with_filenames = true

is set in Rails then each rendered view and partial will have a comment
at the top like:

    <!-- BEGIN app/views/thing/index.html.erb -->

When this comment is present before the doctype, it causes the HTML to be
invalid in a way that is not useful so we remove the comment.
@eoinkelly eoinkelly requested a review from robotdana October 13, 2023 22:06
Copy link
Contributor

@G-Rath G-Rath left a comment

Choose a reason for hiding this comment

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

I think we should update the version in a dedicated PR when we are doing the release straight after, in case something comes up between this PR and then (or we discover something else we want to do)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible with config.action_view.annotate_rendered_view_with_filenames
2 participants