Skip to content

Commit 5387769

Browse files
bors[bot]burrbull
andauthored
Merge #524
524: multiline descriptions r=Emilgardis a=burrbull Fixes #523 Co-authored-by: Andrey Zgarbul <zgarbul.andrey@gmail.com>
2 parents 5e30d5d + 90084c5 commit 5387769

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1515

1616
### Changed
1717

18+
- `\n` in descriptions for multiline
1819
- `_rererved` fields in `RegisterBlock` now hexidemical usize
1920
- options can be set now with `svd2rust.toml` config
2021
- option `ignore_groups` for optional disabling #506

src/util.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,10 @@ impl ToSanitizedPascalCase for str {
151151
}
152152

153153
pub fn respace(s: &str) -> String {
154-
s.split_whitespace().collect::<Vec<_>>().join(" ")
154+
s.split_whitespace()
155+
.collect::<Vec<_>>()
156+
.join(" ")
157+
.replace(r"\n", "\n")
155158
}
156159

157160
pub fn escape_brackets(s: &str) -> String {

0 commit comments

Comments
 (0)