mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Closes #1028: Fix line block output in the text builder.
This commit is contained in:
parent
67aa6029e8
commit
2efca93473
2
CHANGES
2
CHANGES
@ -28,6 +28,8 @@ Release 1.2 (in development)
|
||||
|
||||
* #1015: Stop overriding jQuery contains() in the JavaScript.
|
||||
|
||||
* #1028: Fix line block output in the text builder.
|
||||
|
||||
|
||||
Release 1.1.3 (Mar 10, 2012)
|
||||
============================
|
||||
|
@ -71,6 +71,7 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
self.stateindent = [0]
|
||||
self.list_counter = []
|
||||
self.sectionlevel = 0
|
||||
self.lineblocklevel = 0
|
||||
self.table = None
|
||||
|
||||
def add_text(self, text):
|
||||
@ -593,14 +594,18 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
self.end_state(wrap=False)
|
||||
|
||||
def visit_line_block(self, node):
|
||||
self.new_state(0)
|
||||
self.new_state()
|
||||
self.lineblocklevel += 1
|
||||
def depart_line_block(self, node):
|
||||
self.end_state(wrap=False)
|
||||
self.lineblocklevel -= 1
|
||||
self.end_state(wrap=False, end=None)
|
||||
if not self.lineblocklevel:
|
||||
self.add_text('\n')
|
||||
|
||||
def visit_line(self, node):
|
||||
pass
|
||||
def depart_line(self, node):
|
||||
pass
|
||||
self.add_text('\n')
|
||||
|
||||
def visit_block_quote(self, node):
|
||||
self.new_state()
|
||||
|
Loading…
Reference in New Issue
Block a user