Closed
Description
Given an SVD with an HTML link in a description creates either a correct or a partially escaped link definition depending on where it is generated in the PAC.
E.g., relevant part of input SVD:
<peripheral>
<name>Google</name>
<version>1.0</version>
<description>
Link to Google: <https://google.com>
</description>
<registers>...</registers>
</peripheral>
Relevant parts of output:
#[doc = "Link to Google: <https://google.com>"]
pub mod google;
#[doc = "Link to Google: <https://google.com>"]
pub struct Google {
_marker: PhantomData<*const ()>,
}
We see the generated link symbols are partially escaped when used in the mod
documentation and correctly escaped when used in peripheral struct
documentation.
Reproduction
- Attached, minimal SVD to reproduce issue: test.zip (in Zip due to GitHub file-type restriction)
- Command to generate:
svd2rust --target riscv -i test.svd && form -i lib.rs -o src && rm lib.rs && cargo fmt
svd2rust --version
svd2rust 0.33.3 ( )
Metadata
Metadata
Assignees
Labels
No labels