Commit 877196f
Merge #553
553: Fixes in multi line description generation r=burrbull a=luojia65
This pull request contains two fixes:
1. New line separators are now rendered in enumerated values.
2. Multi line field descriptions are now rendered correctly in write and read registers.
This issue happened because the original code accidentally unescaped and respaced twice in field parse proccess. It uses escaped description [L292](https://github.com/rust-embedded/svd2rust/compare/master...luojia65:fix-new-line?expand=1#diff-ff493acd6701940416e9725ce824c71d3039b5c56efc3721cf15d1688b3f7deaL292) as input, but in `desctiption_with_bits` function later [L1001](https://github.com/rust-embedded/svd2rust/compare/master...luojia65:fix-new-line?expand=1#diff-ff493acd6701940416e9725ce824c71d3039b5c56efc3721cf15d1688b3f7deaL1001 ) it unescaped again, resulting in loss of new line separators `\n`.
Before:

After:

Co-authored-by: luojia65 <me@luojia.cc>2 files changed
+9
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
14 | 16 | | |
15 | 17 | | |
16 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
| 292 | + | |
| 293 | + | |
297 | 294 | | |
298 | 295 | | |
299 | 296 | | |
| |||
427 | 424 | | |
428 | 425 | | |
429 | 426 | | |
430 | | - | |
| 427 | + | |
431 | 428 | | |
432 | 429 | | |
433 | 430 | | |
| |||
439 | 436 | | |
440 | 437 | | |
441 | 438 | | |
442 | | - | |
| 439 | + | |
443 | 440 | | |
444 | 441 | | |
445 | 442 | | |
| |||
792 | 789 | | |
793 | 790 | | |
794 | 791 | | |
795 | | - | |
| 792 | + | |
796 | 793 | | |
797 | 794 | | |
798 | 795 | | |
| |||
815 | 812 | | |
816 | 813 | | |
817 | 814 | | |
818 | | - | |
| 815 | + | |
819 | 816 | | |
820 | 817 | | |
821 | 818 | | |
| |||
935 | 932 | | |
936 | 933 | | |
937 | 934 | | |
938 | | - | |
| 935 | + | |
939 | 936 | | |
940 | 937 | | |
941 | 938 | | |
| |||
0 commit comments