Opened 5 years ago

Closed 5 years ago

#30365 closed Cleanup/optimization (fixed)

Sphinx interprets some "%[a-z]" in SQL statements as "Literal.String.Interpol" which breaks highlighting.

Reported by: Daniel Musketa Owned by: Daniel Musketa
Component: Documentation Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Example:

https://github.com/django/django/blob/e6d57c4d652f16ac8f8d4600c0b7c30fcfcde6c2/docs/ref/models/querysets.txt#L2679

SQL equivalent::

    SELECT ... WHERE headline LIKE '%Lennon%';

which leads to

<span class="si">%Le</span><span class="s1">nnon%'

Change History (6)

comment:1 by Daniel Musketa, 5 years ago

Has patch: set
Resolution: fixed
Status: assignedclosed

Solution:

Mark SQL examples as .. code-block:: sql

I tried to find other occurances of unmarked SQL code.

https://github.com/django/django/pull/11217

comment:2 by Mariusz Felisiak, 5 years ago

Resolution: fixed
Status: closednew

Ticket is not fixed because PR is not merged.

comment:3 by Mariusz Felisiak, 5 years ago

Easy pickings: set
Summary: Sphinx interprets some "%[a-z]" in SQL statements as "Literal.String.Interpol" which leads to weird highlightingSphinx interprets some "%[a-z]" in SQL statements as "Literal.String.Interpol" which leads to weird highlighting.
Triage Stage: UnreviewedAccepted
Version: 2.2master

comment:4 by Mariusz Felisiak, 5 years ago

Summary: Sphinx interprets some "%[a-z]" in SQL statements as "Literal.String.Interpol" which leads to weird highlighting.Sphinx interprets some "%[a-z]" in SQL statements as "Literal.String.Interpol" which breaks highlighting.

comment:5 by Mariusz Felisiak, 5 years ago

Owner: changed from nobody to Daniel Musketa
Status: newassigned

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 5 years ago

Resolution: fixed
Status: assignedclosed

In 6fd9c9da:

Fixed #30365 -- Fixed syntax highlighting in SQL examples.

Sphinx interprets some "%[a-z]" in SQL statements as a
"Literal.String.Interpol" which leads to incorrect highlighting.

Note: See TracTickets for help on using tickets.
Back to Top