diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f837518..65dc7bbf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/). ## [Unreleased] - Updated syn to version 2 (#732) +- Let readable field fetch doc from svd description (#734) ## [v0.29.0] - 2023-06-05 diff --git a/src/generate/register.rs b/src/generate/register.rs index f552b469..3b790e25 100644 --- a/src/generate/register.rs +++ b/src/generate/register.rs @@ -805,7 +805,7 @@ pub fn fields( span, ); - let doc = format!("Checks if the value of the field is `{pc}`"); + let doc = util::escape_special_chars(&util::respace(&v.doc)); enum_items.extend(quote! { #[doc = #doc] #inline