A long time ago we added some code to avoid running words together: #420290: document preparation runs words together

That's absolutely OK for the search index. But since the result snippets are created from the content field we need to do some more sophisticated stuff. The first thing is to avoid spaces before or after punctuation marks depending on the kind of the punctuation mark.

Example:

Some example <em>text</em>. Some more text.

The search result will look like

Some example text . Some more text.

The expected result will be

Some example text. Some more text.
Files: 
CommentFileSizeAuthor
#6 1927032-avoid-spaces-snippets.patch1.32 KBwonder95
PASSED: [[SimpleTest]]: [MySQL] 520 pass(es). View
#3 1927032.patch968 bytesmkalkbrenner
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
#1 1927032.patch967 bytesmkalkbrenner
FAILED: [[SimpleTest]]: [MySQL] 508 pass(es), 5 fail(s), and 4 exception(s). View

Comments

mkalkbrenner’s picture

Status: Active » Needs review
FileSize
967 bytes
FAILED: [[SimpleTest]]: [MySQL] 508 pass(es), 5 fail(s), and 4 exception(s). View

Status: Needs review » Needs work

The last submitted patch, 1927032.patch, failed testing.

mkalkbrenner’s picture

Status: Needs work » Needs review
FileSize
968 bytes
PASSED: [[SimpleTest]]: [MySQL] 513 pass(es). View
Nick_vh’s picture

Status: Needs review » Reviewed & tested by the community

I assume this is all UTF-8 convention? If so, then this is RTBC

Nick_vh’s picture

Version: 7.x-1.x-dev » 6.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Committed, thanks!

wonder95’s picture

Status: Patch (to be ported) » Needs review
FileSize
1.32 KB
PASSED: [[SimpleTest]]: [MySQL] 520 pass(es). View

Patch for backport to 6.x-3.x is attached.

Nick_vh’s picture

Status: Needs review » Fixed

Committed, thanks!

Nick_vh’s picture

Status: Fixed » Closed (fixed)