rust-embedded / svd2rust

Generate Rust register maps (`struct`s) from SVD files
Apache License 2.0
697 stars 150 forks source link

Escape <> and & symbol in doc attributes. #711

Closed pellico closed 1 year ago

pellico commented 1 year ago

Close #710 The fix escapes only very basic chars <> and & to be as much less intrusive. The fix could be implement without a new dependencies but more escaping may be required in the near future.

Emilgardis commented 1 year ago

Are there cases where we actually want html? Perhaps the description could be using html for nicer formatting

pellico commented 1 year ago

Are there cases where we actually want html? Perhaps the description could be using html for nicer formatting

I am working for the company that generated this SVD and there is no intention to use html. It is just how HW concept engine described a clock signal "HFCLK". In principle we can escape the characters in the SVD comments but this will create a problem for debugger tools. In fact in CMSIS specs html support is not mentioned CMSIS spec. image

So we would like to avoid to have two SVD one for debuggers and one SVD2Rust.

If default escaping is not acceptable, will a command line option be acceptable ?

Emilgardis commented 1 year ago

Alright, this is fine then, a string is not necessarily html :)

The ci error is due to let else being a 1.65 feature, we can bump the minimally supported rust version (MSRV)

pellico commented 1 year ago

Thank you. Let me know if I have to do anything else.

Emilgardis commented 1 year ago

Feel free to add a commit to bump the msrv, it needs to change in the readme and ci

the existing changelog entry for msrv can be changed to 1.65 also

bors[bot] commented 1 year ago

Build succeeded: