[3.0.x] Fixed highlightlang deprecation warning on Sphinx 1.8+.

Backport of 678f958ef972bf9be402332537149ca0884035ba from master
This commit is contained in:
Mariusz Felisiak 2020-04-06 08:05:02 +02:00
parent 042c19cbd0
commit f425835cbe
4 changed files with 7 additions and 7 deletions

View File

@ -34,7 +34,7 @@ or Jinja2_, you should feel right at home with Django's templates.
Templates
=========
.. highlightlang:: html+django
.. highlight:: html+django
A template is a text file. It can generate any text-based format (HTML, XML,
CSV, etc.).

View File

@ -551,7 +551,7 @@ Similar access to this information is available for template code. See below.
Internationalization: in template code
======================================
.. highlightlang:: html+django
.. highlight:: html+django
Translations in :doc:`Django templates </ref/templates/language>` uses two template
tags and a slightly different syntax than in Python code. To give your template
@ -952,7 +952,7 @@ There are also some filters available for convenience:
Internationalization: in JavaScript code
========================================
.. highlightlang:: python
.. highlight:: python
Adding translations to JavaScript poses some problems:
@ -1039,7 +1039,7 @@ precedence.
Using the JavaScript translation catalog
----------------------------------------
.. highlightlang:: javascript
.. highlight:: javascript
To use the catalog, pull in the dynamically generated script like this:
@ -1817,7 +1817,7 @@ redirected in the ``redirect_to`` context variable.
Explicitly setting the active language
--------------------------------------
.. highlightlang:: python
.. highlight:: python
You may want to set the active language for the current session explicitly. Perhaps
a user's language preference is retrieved from another system, for example.

View File

@ -10,7 +10,7 @@ on securing a Django-powered site.
Cross site scripting (XSS) protection
=====================================
.. highlightlang:: html+django
.. highlight:: html+django
XSS attacks allow a user to inject client side scripts into the browsers of
other users. This is usually achieved by storing the malicious scripts in the

View File

@ -657,7 +657,7 @@ creating an object that specifies the following attributes:
The Django template language
============================
.. highlightlang:: html+django
.. highlight:: html+django
Syntax
------