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 Match search terms at the start of a string #957

Merged

Conversation

emteknetnz
Copy link
Member

@emteknetnz emteknetnz commented Feb 4, 2022

Needless bool cast causes search terms with a 0 index to not get matched

Caused this failure

On this PR <- that PR is effectively the unit tests coverage for this PR

Because getElementsForSearch() now returns 'trimmed' content rather than content suuronded by whitespace which happened previously because the entire ElementalArea was being rendered, rather than individual content blocks delimited by a space

ElementalArea.ss (includes whitespace before and after the elemental content)

<% if $ElementControllers %>
    <% loop $ElementControllers %>
	   $Me
    <% end_loop %>
<% end_if %>

@emteknetnz
Copy link
Member Author

Failing test is an unrelated graphql4 issue

@emteknetnz emteknetnz merged commit c5eecbf into silverstripe:4.8 Feb 4, 2022
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.

2 participants