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

Multi: comply with Hugo rules for HTML comments #1757

Closed

Conversation

harding
Copy link
Collaborator

@harding harding commented Jun 27, 2024

Part of #1551

If an HTML starts a line within a paragraph, Hugo will end the paragraph. E.g., this paragraph:

Mary had a little lamb
<!-- source: my childhood -->
whose fleece was white as snow.

Becomes:

<p>Mary had a little lamb</p>
<!-- source: my childhood -->
whose fleece was white as snow.

This commit adds a test to fail on any comments like that and fixes all existing cases.

If an HTML starts a line within a paragraph, Hugo will end the
paragraph.  E.g., this paragraph:

    Mary had a little lamb
    <!-- source: my childhood -->
    whose fleece was white as snow.

Becomes:

    <p>Mary had a little lamb</p>
    <!-- source: my childhood -->
    whose fleece was white as snow.

This commit adds a test to fail on any comments like that and fixes all
existing cases.
Copy link
Contributor

@bitschmidty bitschmidty left a comment

Choose a reason for hiding this comment

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

tACK

  • smoke tested a few /en/ pages for visual changes, none found
  • reverted one of the comment fixups and ensured it was caught by the new test

@harding ready for merge based on your other Hugo work, feel free to merge when ready

@harding
Copy link
Collaborator Author

harding commented Aug 2, 2024

Rebased on latest master in combination with #1761, ran all tests, and pushed to master.

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.

2 participants