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

feat: Leave empty line between NEWS entries #685

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

feat: Leave empty line between NEWS entries #685

wants to merge 5 commits into from

Conversation

krlmlr
Copy link
Contributor

@krlmlr krlmlr commented Jun 21, 2023

For some reason, this adds spurious newlines. @maelle: can you please take a look?

Moving forward, should we replace pandoc by something lighter-weight? We really only need to detect /^#+/ because we assume that nobody will write unindented code blocks or similar that contain this pattern. I'm willing to live with any limitations that will bring.

With pandoc, tests are running very slow too.

@krlmlr
Copy link
Contributor Author

krlmlr commented Jun 26, 2023

Let's keep pandoc for now, we might want to parse links or other markup later.

I think that the problem here is that paste_news_lines() sometimes receives a character vector where a bullet uses multiple entries. If each bullet point would correspond to exactly one entry in the character vector (with embedded newlines), the problem wouldn't occur.

subsections_present <- (is_any_named(lines))

if (!subsections_present) {
lines <- gsub("^- ", "\n- ", lines)
Copy link
Member

Choose a reason for hiding this comment

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

this is a bit of a hack... sometimes there are new lines in the messages, but we've bulleted them previously so we can recognize items.

Copy link
Contributor Author

@krlmlr krlmlr left a comment

Choose a reason for hiding this comment

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

This seems challenging. What are we missing?


## Bug fixes

- Prevent racing of requests.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We still want the empty paragraphs here?

@maelle
Copy link
Member

maelle commented Sep 25, 2023

I wonder if we make some lines Markdown too early. We use Pandoc, get HTML, then we shouldn't go back to Markdown before the writing stage, this way we can differentiate line breaks and actual paragraphs.

@maelle
Copy link
Member

maelle commented Sep 25, 2023

I noticed that there should be a flexibility of main header level (are versions h1 and h2) but it is not respected for the scope of conventional commits.

I'll leave this aside for a while.

@krlmlr
Copy link
Contributor Author

krlmlr commented Oct 29, 2023

Also want to strip spaces at EOL as part of this.

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

Successfully merging this pull request may close these issues.

2 participants