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

fix: escape issue in additives knowledge panel - remove latex formulas #8340

Merged
merged 7 commits into from
May 11, 2023

Conversation

stephanegigandet
Copy link
Contributor

@stephanegigandet stephanegigandet commented Apr 20, 2023

What

image

this particular wikipedia abstract is really not relevant to OFF, I would be very much in favor to creating our own additives descriptions.

Part of

@stephanegigandet stephanegigandet requested a review from a team as a code owner April 20, 2023 18:16
@github-actions github-actions bot added the 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels label Apr 20, 2023
@codecov-commenter
Copy link

codecov-commenter commented Apr 21, 2023

Codecov Report

Merging #8340 (bd6f92d) into main (6bb43ea) will increase coverage by 0.01%.
The diff coverage is 69.23%.

@@            Coverage Diff             @@
##             main    #8340      +/-   ##
==========================================
+ Coverage   48.16%   48.17%   +0.01%     
==========================================
  Files         109      110       +1     
  Lines       21015    21026      +11     
  Branches     4739     4739              
==========================================
+ Hits        10122    10130       +8     
- Misses       9618     9621       +3     
  Partials     1275     1275              
Impacted Files Coverage Δ
lib/ProductOpener/KnowledgePanels.pm 11.62% <20.00%> (-0.11%) ⬇️
tests/unit/knowledge_panels.t 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

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

👍

)*
} # match a closing }
)
//xg;
Copy link
Member

Choose a reason for hiding this comment

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

So good you used extended format for regexp ❤️

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@alexgarel Well I adapted some code I found on Stack Overflow that had this extended format which is indeed quite cool. That's after ChatGPT gave me 3 wrong answers. ;)

@github-actions github-actions bot added Agribalyse French LCA database used in Eco-Score computations 🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests labels May 4, 2023
@sonarcloud
Copy link

sonarcloud bot commented May 4, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@stephanegigandet stephanegigandet merged commit 1d8583b into main May 11, 2023
@stephanegigandet stephanegigandet deleted the fix-additives-panels branch May 11, 2023 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agribalyse French LCA database used in Eco-Score computations 🌱 Eco-Score https://world.openfoodfacts.org/eco-score-the-environmental-impact-of-food-products 📖 Knowledge Panels https://wiki.openfoodfacts.org/Knowledge_panels Template::Toolkit The templating toolkit used by product opener. The starting point for HTML/JS/CSS fixes. 🧪 tests
Projects
Development

Successfully merging this pull request may close these issues.

Some additives not shown, malformed knowledge panel for wikipedia abstracts
3 participants