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

11 views
Skip to first unread message

Django

unread,
Apr 13, 2019, 9:47:04 AM4/13/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which leads to weird highlighting
------------------------------------------------+--------------------------
Reporter: Daniel Musketa | Owner: nobody
Type: Cleanup/optimization | Status: assigned
Component: Documentation | Version: 2.2
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+--------------------------
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%'}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30365>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 13, 2019, 9:55:11 AM4/13/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which leads to weird highlighting
-------------------------------------+-------------------------------------

Reporter: Daniel Musketa | Owner: nobody
Type: | Status: closed
Cleanup/optimization |
Component: Documentation | Version: 2.2
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Daniel Musketa):

* status: assigned => closed
* has_patch: 0 => 1
* resolution: => fixed


Comment:

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

--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:1>

Django

unread,
Apr 13, 2019, 10:14:23 AM4/13/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which leads to weird highlighting
-------------------------------------+-------------------------------------

Reporter: Daniel Musketa | Owner: nobody
Type: | Status: new
Cleanup/optimization |
Component: Documentation | Version: 2.2
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* status: closed => new
* resolution: fixed =>


Comment:

Ticket is not fixed because PR is not merged.

--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:2>

Django

unread,
Apr 15, 2019, 6:35:59 AM4/15/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which leads to weird highlighting.
--------------------------------------+------------------------------------

Reporter: Daniel Musketa | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------
Changes (by felixxm):

* version: 2.2 => master
* easy: 0 => 1
* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:3>

Django

unread,
Apr 15, 2019, 6:36:58 AM4/15/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which breaks highlighting.
--------------------------------------+------------------------------------

Reporter: Daniel Musketa | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
--------------------------------------+------------------------------------

--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:4>

Django

unread,
Apr 15, 2019, 2:12:22 PM4/15/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which breaks highlighting.
-------------------------------------+-------------------------------------
Reporter: Daniel Musketa | Owner: Daniel
Type: | Musketa
Cleanup/optimization | Status: assigned

Component: Documentation | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by felixxm):

* owner: nobody => Daniel Musketa
* status: new => assigned


--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:5>

Django

unread,
Apr 23, 2019, 7:14:09 AM4/23/19
to django-...@googlegroups.com
#30365: Sphinx interprets some "%[a-z]" in SQL statements as
"Literal.String.Interpol" which breaks highlighting.
-------------------------------------+-------------------------------------
Reporter: Daniel Musketa | Owner: Daniel
Type: | Musketa
Cleanup/optimization | Status: closed
Component: Documentation | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 1 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Mariusz Felisiak <felisiak.mariusz@…>):

* status: assigned => closed

* resolution: => fixed


Comment:

In [changeset:"6fd9c9daa61b7103ccb03a7618483e4d580bfe25" 6fd9c9da]:
{{{
#!CommitTicketReference repository=""
revision="6fd9c9daa61b7103ccb03a7618483e4d580bfe25"
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.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/30365#comment:6>

Reply all
Reply to author
Forward
0 new messages