-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Ignore first element if it is a comment when determining page title #3956
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
base: master
Are you sure you want to change the base?
Conversation
I can assure you that this Allowing a comment, if there's some problem with it, should probably be a much more targeted change. |
It was not my intention to suggest that #3191 broke previous behaviour. Sorry if that came across. I was trying to figure out where the title is determined and found the most recent change, so I did not look at original behaviour at all. I updated the description. The way I understood "report the first H1 tag" in the PR description was that it would look until it found it. I agree that the heading should come first. I'll try to figure something out that still expects the heading to come first but allows for comments. |
I reverted my change and added a more targeted change to skip the first element if it is an HTML placeholder. |
Nice :) |
When a Markdown document starts with a comment (for example, a copyright notice, such as one gets when adopting REUSE, the heading is not found.
Comments are converted to HTML placeholders by
markdown
.Change the logic to ignore the first element if it is a placeholder (in case it comes before the first-level heading).