mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Merge pull request #2938 from jfbu/allowcodebreaksatcommas
Fix #2873: code-block overflow in latex (due to commas)
This commit is contained in:
commit
5a02c6162b
1
CHANGES
1
CHANGES
@ -15,6 +15,7 @@ Bugs fixed
|
|||||||
* #2917: inline code is hyphenated on HTML
|
* #2917: inline code is hyphenated on HTML
|
||||||
* #1462: autosummary warns for namedtuple with attribute with trailing underscore
|
* #1462: autosummary warns for namedtuple with attribute with trailing underscore
|
||||||
* Could not reference equations if ``:nowrap:`` option specified
|
* Could not reference equations if ``:nowrap:`` option specified
|
||||||
|
* #2873: code-block overflow in latex (due to commas)
|
||||||
|
|
||||||
Release 1.4.6 (released Aug 20, 2016)
|
Release 1.4.6 (released Aug 20, 2016)
|
||||||
=====================================
|
=====================================
|
||||||
|
@ -290,6 +290,7 @@
|
|||||||
\def\PYGZti{\discretionary{\char`\~}{\sphinxafterbreak}{\char`\~}}%
|
\def\PYGZti{\discretionary{\char`\~}{\sphinxafterbreak}{\char`\~}}%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
\def\sphinx@verbatim@nolig@list {\do \`}%
|
||||||
% Some characters . , ; ? ! / are not pygmentized.
|
% Some characters . , ; ? ! / are not pygmentized.
|
||||||
% This macro makes them "active" and they will insert potential linebreaks
|
% This macro makes them "active" and they will insert potential linebreaks
|
||||||
\newcommand*\sphinxbreaksatpunct {%
|
\newcommand*\sphinxbreaksatpunct {%
|
||||||
@ -387,6 +388,8 @@
|
|||||||
% For grid placement from \strut's in \FancyVerbFormatLine
|
% For grid placement from \strut's in \FancyVerbFormatLine
|
||||||
\lineskip\z@skip
|
\lineskip\z@skip
|
||||||
% Breaks at punctuation characters . , ; ? ! and / need catcode=\active
|
% Breaks at punctuation characters . , ; ? ! and / need catcode=\active
|
||||||
|
% and the active comma should not be overwritten by \@noligs
|
||||||
|
\let\verbatim@nolig@list \sphinx@verbatim@nolig@list
|
||||||
\OriginalVerbatim[#1,codes*=\sphinxbreaksatpunct]%
|
\OriginalVerbatim[#1,codes*=\sphinxbreaksatpunct]%
|
||||||
}
|
}
|
||||||
\renewcommand{\endVerbatim}{%
|
\renewcommand{\endVerbatim}{%
|
||||||
|
Loading…
Reference in New Issue
Block a user