Skip to content

Commit

Permalink
special handling of indentation for code block to allow tabs in the c…
Browse files Browse the repository at this point in the history
…ode block(Bug#539768)
  • Loading branch information
anandology committed Mar 17, 2010
1 parent e6b88ed commit e3ddc22
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion web/template.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,12 @@ def find_indent(text):

# find the indentation of the block by looking at the first line
first_indent = find_indent(text)[len(begin_indent):]
indent = begin_indent + min(first_indent, INDENT)

#TODO: fix this special case
if keyword == "code":
indent = begin_indent + first_indent
else:
indent = begin_indent + min(first_indent, INDENT)

block, text = self.read_indented_block(text, indent)

Expand Down

0 comments on commit e3ddc22

Please sign in to comment.