Skip to content

Commit

Permalink
Use type that is mapped to ParseChangelogErrorInternal::Markdown (#4)
Browse files Browse the repository at this point in the history
The value of the error being mapped here
https://github.com/heroku/keep_a_changelog/blob/c4d62b03052a0fd5f17424fcad4c646abae01d31/src/changelog.rs#L270
isn't a String anymore, which causes compilation errors.

The default behavior of the `markdown` crate was changed in
wooorm/markdown-rs@3dc7f1a.

Alternative solution would be pinning the `markdown` crate to version
[1.0.0-alpha.16](https://github.com/wooorm/markdown-rs/releases/tag/1.0.0-alpha.16).
Seems like it might be a good idea to pin the version in any case though
(considering breaking changes are introduced like this?)
  • Loading branch information
runesoerensen authored Apr 25, 2024
1 parent c4d62b0 commit f92ec48
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ rust-version = "1.74"
chrono = "0.4"
indexmap = "2"
lazy_static = "1"
markdown = "1.0.0-alpha.14"
markdown = "=1.0.0-alpha.17"
regex = "1"
semver = "1"
thiserror = "1"
Expand Down
2 changes: 1 addition & 1 deletion src/changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ pub struct ParseChangelogError(#[from] ParseChangelogErrorInternal);
#[derive(Debug, Error)]
enum ParseChangelogErrorInternal {
#[error("Could not parse changelog as markdown\nError: {0}")]
Markdown(String),
Markdown(markdown::message::Message),

#[error("Could not parse change group type from changelog - {0}\nError: {1}")]
InvalidChangeGroup(String, #[source] ParseChangeGroupError),
Expand Down

0 comments on commit f92ec48

Please sign in to comment.