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

extra space in Contributors title #122

Open
tjx666 opened this issue Jul 3, 2023 · 2 comments
Open

extra space in Contributors title #122

tjx666 opened this issue Jul 3, 2023 · 2 comments
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@tjx666
Copy link

tjx666 commented Jul 3, 2023

Environment

node: 18.16.0
changelogen: 0.5.3

Reproduction

https://github.com/unjs/changelogen/blob/main/CHANGELOG.md?plain=1

image

Describe the bug

latest version will generate extra useless space between ❤️ and Contributors.

And there are some other format issue:

image

following is the fix in my package:

let md = await generateMarkDown(commits, config);
// remove extra empty lines
md = md.replaceAll('\n\n\n', '\n\n');

// remove extra list indent
md = md.replaceAll('  - ', '- ');

// move compare changes part to bottom position
const compareChanges = md
    .split('\n')
    .map((line) => line.trim())
    .filter((line) => line !== '')
    .find((line) => line.startsWith('[compare changes]('))!
    .replace('compare changes', 'View changes on GitHub');
md = md.replace(`${compareChanges}\n\n`, '');
md += `\n\n${compareChanges}`;

I also find that prettier will do following fix:

image

Additional context

No response

Logs

No response

@Hebilicious Hebilicious added bug Something isn't working good first issue Good for newcomers labels Jul 3, 2023
@tmlmt
Copy link
Contributor

tmlmt commented Jul 3, 2023

v0.5.4 has resolved the two red arrows in your second screenshot.

It's a good point for that extra space in the Contributors title. That's also the case for the "Breaking Changes" one.

@tjx666
Copy link
Author

tjx666 commented Jul 8, 2023

It's a good point for that extra space in the Contributors title. That's also the case for the "Breaking Changes" one.

  1. seems will be auto trimed by prettier
  2. the extra space will not be renderer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants