Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
remove line breaks in rubrics titles
Browse files Browse the repository at this point in the history
  • Loading branch information
mantepse committed Oct 23, 2016
1 parent db003fa commit 6774f4f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions build/pkgs/sphinx/patches/texinfo.patch
@@ -0,0 +1,21 @@
Make sure that titles of rubrics do not contain line breaks

diff -ru a/sphinx/writers/texinfo b/sphinx/writers/texinfo
--- a/sphinx/writers/texinfo.py 2016-06-11 12:57:23.000000000 +0200
+++ b/sphinx/writers/texinfo.py 2016-10-23 21:10:55.198715409 +0200
@@ -615,6 +615,7 @@
self.body.append('\n\n')

def visit_rubric(self, node):
+ self.escape_newlines += 1
if len(node.children) == 1 and node.children[0].astext() in \
('Footnotes', _('Footnotes')):
raise nodes.SkipNode
@@ -626,6 +627,7 @@

def depart_rubric(self, node):
self.body.append('\n\n')
+ self.escape_newlines -= 1

def visit_subtitle(self, node):
self.body.append('\n\n@noindent\n')

0 comments on commit 6774f4f

Please sign in to comment.