Update AbstractParameter.php#959
Conversation
Make lazy null conditionals explicit. Try to handle LaTeX special chars gracefully. Fixes Part-DB#958
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #959 +/- ##
============================================
+ Coverage 59.73% 59.86% +0.13%
- Complexity 6036 6038 +2
============================================
Files 529 529
Lines 20588 20603 +15
============================================
+ Hits 12298 12334 +36
+ Misses 8290 8269 -21 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
I think it is not useful to escape all latex characters, as you then cannot use latex in units anymore at all (which was the whole point for using latex for formatting the units). For simple units you don't need it, but for something like I changed it in a way, that only the percentage sign gets escaped, as it is very unlikely that somebody wants to put a comment into a unit, and it will be more likely used as a percentage sign. |
|
Make perfect sense. |
888ce3c to
02409f4
Compare
Make lazy null conditionals explicit, thus enabling output of
0as parameter value.Try to handle LaTeX special chars gracefully (especially %, as seen in the referenced issue).
Fixes #958
(Javascript code will need some work too: the LaTeX controllers also don't handle special chars.
The parameter selection drop-down show some params incorrectly, e.g.
Tolerance [%]shows asTolerance[.The parameter preview shows an error e.g. when entering
%; With\%, it works.)