Skip to content

Commit

Permalink
Hotfix-0.7.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxim Avanov committed Jun 17, 2012
1 parent 272043d commit 131bf0a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGES
Expand Up @@ -4,6 +4,8 @@ Changelog

Version 0.7
------------
- 0.7.2
Fix bug with literal one-liners.

- 0.7.1
Fixed installation error caused by missing README.rst.
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -50,7 +50,7 @@
# The short X.Y version.
version = '0.7'
# The full version, including alpha/beta/rc tags.
release = '0.7.1'
release = '0.7.2'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
7 changes: 5 additions & 2 deletions plim/lexer.py
Expand Up @@ -234,7 +234,11 @@ def _extract_braces_api(line, source, starting_braces_re, open_braces_re, closin
buf = [open_brace]
tail = line[len(open_brace):]
braces_counter = 1


if not tail:
_, tail = next(source)
tail = tail.lstrip()

while tail:
current_char = tail[0]
if closing_braces_re.match(current_char):
Expand Down Expand Up @@ -493,7 +497,6 @@ def extract_plim_line(line, source):
# 3. Parse tag attributes
# -----------------------------------
_, tail, source = extract_line_break(tail.lstrip(), source)

parentheses = tail.startswith(OPEN_BRACE)
if parentheses:
tail = tail[1:].lstrip()
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -3,6 +3,6 @@ verbose=True
verbosity=3
detailed-errors=1
with-coverage=True
cover-package=Plim
cover-package=plim
pdb-failures=False
nocapture=True
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -11,7 +11,7 @@

setup(
name='Plim',
version='0.7.1',
version='0.7.2',
packages=find_packages(exclude=['tests']),
# Plim is a preprocessor for Mako template language.
# But it doesn't depend on the Mako package itself.
Expand Down
2 changes: 1 addition & 1 deletion tests/__init__.py
Expand Up @@ -29,7 +29,7 @@ def test_plim(self):
cases = [
'pipe', 'plim_line', 'if', 'unless', 'python', 'for', 'while', 'until', 'with',
'try', 'def_block', 'style_script', 'comment', 'one_liners', 'mako_text',
'early_return', 'call', 'multiline_variable', 'literal_one_liners', 'no_filtering'
'early_return', 'call', 'multiline_variable', 'literal_one_liners', 'no_filtering',
]
for test_case in cases:
source = self.get_file_contents(test_case + '_test.html')
Expand Down
4 changes: 3 additions & 1 deletion tests/fixtures/literal_one_liners_result.html
Expand Up @@ -45,4 +45,6 @@
<li${extra_attrs|n}>
<a href="${link['url']}" id="${link.get('id', 'sidenav-{}'.format(i))}">${link['text']}</a></li>
<li${extra_attrs|n}>
<a href="${link['url']}" id="${link.get('id', 'sidenav-{}'.format(i))}">${link['text']}</a></li>
<a href="${link['url']}" id="${link.get('id', 'sidenav-{}'.format(i))}">${link['text']}</a></li>
<li${extra_attrs|n}>
<a href="${link['url']}" data-cache="${cache}" data-frame="${frame}" id="${link.get('id', 'sidenav-{}'.format(i))}" class="${asl_class}">${link['text']}</a></li>
8 changes: 8 additions & 0 deletions tests/fixtures/literal_one_liners_test.html
Expand Up @@ -53,4 +53,12 @@

<li${extra_attrs|n}>
a#${link.get('id', 'sidenav-{}'.format(i))} href=link['url'] = link['text']
</li>

<li${extra_attrs|n}>
a#${
link.get('id', 'sidenav-{}'.format(i))
}.${asl_class} href=link['url'] \
data-cache=cache \
data-frame=frame = link['text']
</li>

0 comments on commit 131bf0a

Please sign in to comment.