-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Partial escape of HTML link from peripheral description #849
Comments
I've never see links in description. Is this allowed by SVD? I'm not sure. |
I would've assumed that svd2rust does not do transformations of the field contents but it does seem to translate special HTML characters. Surely it's wrong that it sometimes does it and sometimes not. The behavior is relevant for our use case. I'll try to find time to investigate. |
PRs are appreciated. |
I've found that causer is encode_text_minimal. |
Sorry, I don't necessarily understand the question. I'm also sorry I didn't get to investigating it myself. It's a low priority issue for us at the end of the day and we re-generate PACs infrequently. We use peripheral level links to point to the relevant hardware implementation / documentation when working with open-source hardware IP. Consistency is good enough, i.e. both links generated the same way. We can script the rest if necessary. Does that answer the question? |
The question is why #711 was introduced. Maybe it is just not actual in newer versions of Rust. |
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:
Relevant parts of output:
We see the generated link symbols are partially escaped when used in the
mod
documentation and correctly escaped when used in peripheralstruct
documentation.Reproduction
svd2rust --target riscv -i test.svd && form -i lib.rs -o src && rm lib.rs && cargo fmt
svd2rust --version
The text was updated successfully, but these errors were encountered: