Skip to content

Commit

Permalink
Merge #524
Browse files Browse the repository at this point in the history
524: multiline descriptions r=Emilgardis a=burrbull

Fixes #523

Co-authored-by: Andrey Zgarbul <[email protected]>
  • Loading branch information
bors[bot] and burrbull authored May 25, 2021
2 parents 5e30d5d + 90084c5 commit 5387769
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- `\n` in descriptions for multiline
- `_rererved` fields in `RegisterBlock` now hexidemical usize
- options can be set now with `svd2rust.toml` config
- option `ignore_groups` for optional disabling #506
Expand Down
5 changes: 4 additions & 1 deletion src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,10 @@ impl ToSanitizedPascalCase for str {
}

pub fn respace(s: &str) -> String {
s.split_whitespace().collect::<Vec<_>>().join(" ")
s.split_whitespace()
.collect::<Vec<_>>()
.join(" ")
.replace(r"\n", "\n")
}

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

0 comments on commit 5387769

Please sign in to comment.