diff options
| author | Sean Brant | 2013-03-14 23:20:21 -0500 |
|---|---|---|
| committer | Sean Brant | 2013-03-14 23:20:25 -0500 |
| commit | e65552efafe3d64b8bafecc6b94c7c3d5583b02d (patch) | |
| tree | 91ce147b8bd8aa6d3ed956f349a56293a4b5f283 /tests/test_section.py | |
| parent | 4e128a2fe118494356e2d9bfdea0c9b537fa2578 (diff) | |
| download | pykss-e65552efafe3d64b8bafecc6b94c7c3d5583b02d.tar.bz2 | |
Adds optional syntax to example blocks
This is helpful when you need to add a modifier call to template that
might not otherwise have a class. Instead of displaying class="" you
can wrap wrap the class []? which will strip it out of the section
example but leave it in the modifier examples.
<a href="#"[ class="$modifier_class]?>Link</a>
Diffstat (limited to 'tests/test_section.py')
| -rw-r--r-- | tests/test_section.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/test_section.py b/tests/test_section.py index 6ece110..200e65e 100644 --- a/tests/test_section.py +++ b/tests/test_section.py @@ -17,7 +17,7 @@ Your standard form button. .smaller - A smaller button Example: - <a href="button$modifier_class">Button</a> + <a href="#" class="button$modifier_class">Button</a><a href="#"[ class="$modifier_class"]?>Button</a> Styleguide 2.1.1. """ @@ -36,7 +36,8 @@ Styleguide 2.1.1. self.assertEqual(self.section.modifiers[0].description, 'Highlights when hovering.') def test_parses_the_example(self): - self.assertEqual(self.section.example, '<a href="button">Button</a>') + expected = '<a href="#" class="button">Button</a><a href="#">Button</a>' + self.assertEqual(self.section.example, expected) def test_parses_the_styleguide_reference(self): self.assertEqual(self.section.section, '2.1.1') |
