Page MenuHomePhabricator

Parsing example queries partially produce errors
Open, Needs TriagePublic


It seems that some queries parsed from are not displayed correctly on the example pop-up on : when opening an example query, the # of the code lines are displayed inside the query code, which makes it fail.

Steps to reproduce:

  • Go to
  • Click on the "Examples" button
  • type "lexeme" in the filter box and pick any of the suggested queries
  • look at the query code: numbers appear at the beginning of each line

Screenshot from 2020-12-16 15-50-52.png (243×726 px, 45 KB)

I noticed this for the first time on December 16th, but I'm not sure since when it's broken.
Not all examples are affected, the ones at the beginning of the list (eg cats) work correctly.


  • Where does it come from? Is it an issue in the WDQS UI or with the templated used on the wikipage?

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lea_Lacroix_WMDE added a subscriber: Tagishsimon.

Pinging @Tagishsimon since it seems that you discovered this issue a few days ago. Is it already reported somewhere else?

The template itself hasn't changed recently so a template enclosed in this template is probably at issue here.

According to
previously, syntaxhighlight markup looked like:

<span class="lineno"> 1 </span><span class="c">#defaultView:BarChart</span>

Line numbers were not selectable.

Now generated html looks like:

<span class="linenos"> 1</span><span class="c"># See also the SPARQL manual</span>

The worst part (despite that some external tools were broken) that now when you select code block, line numbers are selected and copied too.

Lineno were renamed to linenos in