Skip to content

Prevent unintended rendering of report content #32

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

Merged
merged 1 commit into from
Mar 31, 2023
Merged

Prevent unintended rendering of report content #32

merged 1 commit into from
Mar 31, 2023

Conversation

per1234
Copy link
Collaborator

@per1234 per1234 commented Mar 31, 2023

The report is made in the form of GitHub PR comment. These comments are rendered according to the "GitHub Flavored Markdown" markup language.

In addition to the intentional markup used to format the report, the uncontrolled strings of the report content might contain incidental markup. Previously, this would cause the report to be rendered incorrectly.

For example, the FQBN arduino:avr:mega:cpu=atmega2560 contains the :mega: markup for the 📣 emoji, so was rendered incorrectly:

arduino:avr📣cpu=atmega2560

The solution is to wrap the uncontrolled strings in the Markdown "code span" markup.

Since the entire CSV format report is already wrapped in the equivalent "code fence" markup, the introduction of this markup into that part of the report is unnecessary.

The report is made in the form of GitHub PR comment. These comments are rendered according to the "GitHub Flavored
Markdown" markup language.

In addition to the intentional markup used to format the report, the uncontrolled strings of the report content might
contain incidental markup. Previously, this would cause the report to be rendered incorrectly.

For example, the FQBN `arduino:avr:mega:cpu=atmega2560` contains the markup for the megaphone emoji, so was rendered
incorrectly:

> arduino:avr📣cpu=atmega2560

The solution is to wrap the uncontrolled strings in the Markdown "code span" markup.

Since the entire CSV format report is already wrapped in the equivalent "code fences" markup, the introduction of this
markup into that part of the report is unnecessary.
@per1234 per1234 added type: imperfection Perceived defect in any part of project topic: code Related to content of the project itself labels Mar 31, 2023
@per1234 per1234 self-assigned this Mar 31, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (239ce6d) 100.00% compared to head (5cbb096) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #32   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            2         2           
  Lines          726       732    +6     
=========================================
+ Hits           726       732    +6     
Impacted Files Coverage Δ
reportsizedeltas/tests/test_reportsizedeltas.py 100.00% <ø> (ø)
reportsizedeltas/reportsizedeltas.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@per1234 per1234 merged commit a22a921 into arduino:main Mar 31, 2023
@per1234 per1234 deleted the unintentional-emoji branch March 31, 2023 11:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: code Related to content of the project itself type: imperfection Perceived defect in any part of project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants