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

Extract page description after any leading headings #303

Conversation

jonathanhefner
Copy link
Member

The page_description helper extracts the description from the leading paragraph of its input. Prior to this commit, a paragraph following an <h1> was recognized as a leading paragraph, but a paragraph following any other heading was not.

This commit changes page_description such that it selects the <p> that is the first non-heading element of its input.

The `page_description` helper extracts the description from the leading
paragraph of its input.  Prior to this commit, a paragraph following an
`<h1>` was recognized as a leading paragraph, but a paragraph following
any other heading was not.

This commit changes `page_description` such that it selects the `<p>`
that is the first non-heading element of its input.
@jonathanhefner jonathanhefner merged commit 12ee375 into rails:main Sep 14, 2023
10 checks passed
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.

1 participant