diff --git a/CHANGES.rst b/CHANGES.rst index 7a94e8f8..c5ee9875 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -5,6 +5,7 @@ Unreleased - Drop support for Python 3.9. - Remove previously deprecated code. +- Support Python 3.14 template strings. :issue:`511` Version 3.0.3 diff --git a/docs/formatting.rst b/docs/formatting.rst index c14f9170..3a786650 100644 --- a/docs/formatting.rst +++ b/docs/formatting.rst @@ -6,6 +6,26 @@ String Formatting The :class:`Markup` class can be used as a format string. Objects formatted into a markup string will be escaped first. +t-strings +--------- + +.. versionadded:: 3.1.0 + +On Python 3.14 :ref:`python:t-strings` can be passed to :class:`Markup` +(or :func:`escape`), any interpolated value will be escaped while literal +content will be treated as as markup. + +.. code-block:: pycon + + >>> uid, name = 3, "