Yoast / YoastSEO.js

Analyze content on a page and give SEO feedback as well as render a snippet preview.
GNU General Public License v3.0
403 stars 171 forks source link

A keyword followed by a square bracket does not get recognized. #2148

Open hansjovis opened 5 years ago

hansjovis commented 5 years ago

In the following HTML-fragment:

<h3>Grundlegende Funktionen[Bearbeiten | Quelltext bearbeiten]</h3>

With the following keyphrase forms:

[ [ 'wordpress\\.org' ], [ 'geschichte' ], [ 'funktionen' ] ]

The word "Funktionen" is not recognized. Adding a space between "Funktionen" and the square bracket afterwards does lead to an identification of the word.

I would argue that it should recognize it as an occurence of the keyword.

This bug happens regularly in our full text specs, since we make heavy use of Wikipedia articles. (They use this format for their headings).