cynkra / fledge

Wings for your R packages: Streamline the process of versioning R packages and updating NEWS
https://fledge.cynkra.com
187 stars 11 forks source link

feat: Leave empty line between NEWS entries #685

Open krlmlr opened 1 year ago

krlmlr commented 1 year ago

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 commented 1 year ago

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.

maelle commented 1 year ago

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 commented 1 year ago

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 commented 11 months ago

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