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

Fixed issue #18488: Conditions are not properly highlighted if they have additional spaces #2733

Merged
merged 3 commits into from Nov 17, 2022

Conversation

Shnoulle
Copy link
Collaborator

Dev: trim when view
Dev: trim when save
Dev: uneeded trim in expression

…ave additional spaces

Dev: trim when view
Dev: trim when save
Dev: uneeded trim in expression
@c-schmitz
Copy link
Contributor

I think it solves only part of the problem, as it only trims surrounding spaces of the equation.
It still does not take core of double spaces inside the condition parts, correct?

@Shnoulle
Copy link
Collaborator Author

Shnoulle commented Nov 16, 2022

It still does not take core of double spaces inside the condition parts, correct?

There are no issue with double or triple space inside relevance equation or line feed etc …

private function RDP_Tokenize($sSource, $bOnEdit = false)
don't care of multiple space (don't care of any space) and happily!

Q00.NAOK 
           
== 


"Y"

===
Q00.NAOK=="Y"

There are just the space and line feed after the first { (and before the last) to allow javascript inside question.

Added it during Expression Manager construction some years ago

@Shnoulle
Copy link
Collaborator Author

Shnoulle commented Nov 16, 2022

if ($this->RDP_TokenType[$i] !== 'SPACE' || $bOnEdit) {

// $aTokens = array of tokens from equation, showing value, offsete position, and type. Will not contain SPACE if !$bOnEdit, but will contain OTHER

@sonarcloud
Copy link

sonarcloud bot commented Nov 16, 2022

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

Copy link
Contributor

@c-schmitz c-schmitz left a comment

Choose a reason for hiding this comment

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

Looks good so far, please check my new information in the bug report.

@Shnoulle
Copy link
Collaborator Author

Shnoulle commented Nov 17, 2022

Screen-cast : only one «seems to be a space» character
Peek 17-11-2022 10-36

Character not in this regexp :

$RDP_regex_whitespace = '\s+';

Proof done ?

@c-schmitz c-schmitz merged commit 1028156 into master Nov 17, 2022
@c-schmitz c-schmitz deleted the bug/18488_relevance_need_trimmed branch November 17, 2022 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants