Permalink
Browse files

special handling of indentation for code block to allow tabs in the c…

…ode block(Bug#539768)
  • Loading branch information...
1 parent e6b88ed commit e3ddc222a1d79ca65a4744d512e03897ac4cf196 @anandology anandology committed Mar 17, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 web/template.py
View
@@ -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)

0 comments on commit e3ddc22

Please sign in to comment.