Skip to content
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

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

Merged
merged 3 commits into from
Feb 14, 2023
Merged

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

merged 3 commits into from
Feb 14, 2023

Conversation

pellico
Copy link
Contributor

@pellico pellico commented Feb 10, 2023

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.

@pellico pellico requested a review from a team as a code owner February 10, 2023 09:16
@Emilgardis
Copy link
Member

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

@pellico
Copy link
Contributor Author

pellico commented Feb 10, 2023

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
Copy link
Member

Emilgardis commented Feb 10, 2023

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
Copy link
Contributor Author

pellico commented Feb 13, 2023

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

@Emilgardis
Copy link
Member

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

Copy link
Member

@Emilgardis Emilgardis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

bors r+

@bors
Copy link
Contributor

bors bot commented Feb 14, 2023

Build succeeded:

@bors bors bot merged commit 54a7f49 into rust-embedded:master Feb 14, 2023
@burrbull
Copy link
Member

@Emilgardis
Looks like this PR causes #849.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Warning during doc generation: warning: unclosed HTML tag K
3 participants