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

Paragraph splitting problem #239

Closed
danth opened this issue May 15, 2020 · 1 comment
Closed

Paragraph splitting problem #239

danth opened this issue May 15, 2020 · 1 comment
Assignees
Labels
bug Something isn't working properly

Comments

@danth
Copy link
Member

danth commented May 15, 2020

The problem

#238's squash commit (2e1c50a), for a reason that I haven't figured out yet, had its description parsed as one large paragraph instead of being split.

Additional context

2020-05-15T15:43:12.0024885Z debug: parse_commit_message('feat(history): create emoji parser (#238)
2020-05-15T15:43:12.0025051Z debug: 
2020-05-15T15:43:12.0025265Z debug: Add a commit parser which uses emojis from https://gitmoji.carloscuesta.me/
2020-05-15T15:43:12.0025441Z debug: to determine the type of change.
2020-05-15T15:43:12.0025570Z debug: 
2020-05-15T15:43:12.0025702Z debug: * fix: add emojis to default changelog_sections
2020-05-15T15:43:12.0025841Z debug: 
2020-05-15T15:43:12.0025969Z debug: * fix: include all parsed types in changelog
2020-05-15T15:43:12.0026085Z debug: 
2020-05-15T15:43:12.0026223Z debug: This allows emojis to appear in the changelog, as well as configuring
2020-05-15T15:43:12.0026384Z debug: other types to appear with the Angular parser (I remember someone asking
2020-05-15T15:43:12.0026539Z debug: for that feature a while ago). All filtering is now done in the
2020-05-15T15:43:12.0026678Z debug: markdown_changelog function.
2020-05-15T15:43:12.0026805Z debug: 
2020-05-15T15:43:12.0026938Z debug: * refactor(history): get breaking changes in parser
2020-05-15T15:43:12.0027075Z debug: 
2020-05-15T15:43:12.0027212Z debug: Move the task of detecting breaking change descriptions into the commit
2020-05-15T15:43:12.0027367Z debug: parser function, instead of during changelog generation.
2020-05-15T15:43:12.0027485Z debug: 
2020-05-15T15:43:12.0027622Z debug: This has allowed the emoji parser to also return the regular descriptions as
2020-05-15T15:43:12.0027786Z debug: breaking change descriptions for commits with :boom:.
2020-05-15T15:43:12.0027917Z debug: 
2020-05-15T15:43:12.0028061Z debug: BREAKING CHANGE: Custom commit parser functions are now required to pass
2020-05-15T15:43:12.0028217Z debug: a fifth argument to `ParsedCommit`, which is a list of breaking change
2020-05-15T15:43:12.0028356Z debug: descriptions.
2020-05-15T15:43:12.0028476Z debug: 
2020-05-15T15:43:12.0028786Z debug: * docs: add documentation for emoji parser')
2020-05-15T15:43:12.0030497Z debug: parse_commit_message -> ParsedCommit(bump=2, type='feature', scope='history', descriptions=['create emoji parser (#238)', 'Add a commit parser which uses emojis from https://gitmoji.carloscuesta.me/\r to determine the type of change.\r \r * fix: add emojis to default changelog_sections\r \r * fix: include all parsed types in changelog\r \r This allows emojis to appear in the changelog, as well as configuring\r other types to appear with the Angular parser (I remember someone asking\r for that feature a while ago). All filtering is now done in the\r markdown_changelog function.\r \r * refactor(history): get breaking changes in parser\r \r Move the task of detecting breaking change descriptions into the commit\r parser function, instead of during changelog generation.\r \r This has allowed the emoji parser to also return the regular descriptions as\r breaking change descriptions for commits with :boom:.\r \r BREAKING CHANGE: Custom commit parser functions are now required to pass\r a fifth argument to `ParsedCommit`, which is a list of breaking change\r descriptions.\r \r * docs: add documentation for emoji parser'], breaking_descriptions=[])
@danth danth added the bug Something isn't working properly label May 15, 2020
@danth
Copy link
Member Author

danth commented May 15, 2020

Aaaah, because I created the commit on a Windows machine, it has \r\n line separators, so text.split('\n\n') didn't work since there was a \r in the middle. I think the best solution to this is to simply remove all \rs before processing.

@danth danth self-assigned this May 15, 2020
@danth danth closed this as completed in 34acbbc May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working properly
Projects
None yet
Development

No branches or pull requests

1 participant