waylan/Python-Markdown — pull request #342 by facelessuser (2014-09-20 15:00:47+00:00)
Title: Fix InlineProcessor and add better italic and bold support

### Changes
- Fixes issues with tails in InlineProcessor
- Adds better italic and bold support
- New tests for changes and improved code coverage

### Tests
I cannot install Python 3.1 on my OSX Mavericks
```
py27: commands succeeded
ERROR: py31: InterpreterNotFound: python3.1
py32: commands succeeded
py33: commands succeeded
py34: commands succeeded
```

```
Name Stmts Miss Cover Missing
----------------------------------------------------------------
markdown/__init__ 193 42 78% 141, 330-333, 391-434, 479-493
markdown/__main__ 40 0 100%
markdown/blockparser 30 0 100%
markdown/blockprocessors 273 7 97% 189, 194-195, 204, 253, 546, 552
markdown/extensions/__init__ 34 4 88% 28-29, 36-37
markdown/extensions/abbr 38 0 100%
markdown/extensions/admonition 45 0 100%
markdown/extensions/attr_list 96 0 100%
markdown/extensions/codehilite 99 19 81% 25-27, 43-44, 105-120, 177-178, 181
markdown/extensions/def_list 59 2 97% 95-96
markdown/extensions/extra 54 0 100%
markdown/extensions/fenced_code 48 0 100%
markdown/extensions/footnotes 176 8 95% 91-92, 105, 111, 118, 243, 288-289
markdown/extensions/headerid 84 4 95% 72-73, 75, 103
markdown/extensions/meta 35 0 100%
markdown/extensions/nl2br 11 0 100%
markdown/extensions/sane_lists 17 0 100%
markdown/extensions/smart_strong 14 0 100%
markdown/extensions/smarty 87 0 100%
markdown/extensions/tables 56 0 100%
markdown/extensions/toc 134 18 87% 50-52, 96-104, 118-120, 151, 182, 191
markdown/extensions/wikilinks 49 0 100%
markdown/inlinepatterns 247 1 99% 225
markdown/odict 113 37 67% 25-32, 35, 42, 54, 57, 60-66, 69-71, 104-105, 108-110, 119-122, 129, 136, 139-140, 160, 185-189
markdown/postprocessors 49 0 100%
markdown/preprocessors 207 17 92% 87, 92, 116, 135, 171, 199, 273, 292-304
markdown/serializers 153 48 69% 82-83, 106-117, 143, 147-150, 158, 160, 165, 169-174, 181, 203, 218, 224-235, 238, 254, 259, 262, 266, 269
markdown/treeprocessors 187 4 98% 80, 203-205
markdown/util 59 0 100%
----------------------------------------------------------------
TOTAL 2687 211 92%
```

The only modification that had to be made to existing tests were for these two issues (which I view as improvements):

```diff
--- /Users/facelessuser/Desktop/Python-Markdown/tests/misc/para-with-hr.html
+++ actual_output.html
@@ -2,5 +2,5 @@

Followed by another paragraph.

Here is another paragraph, followed by:
-*** not an HR.
+* not an HR.
Followed by more of the same paragraph.

```

```diff
--- /Users/facelessuser/Desktop/Python-Markdown/tests/misc/em_strong.html
+++ actual_output.html
@@ -4,7 +4,7 @@

With spaces: * *

Two underscores __

with spaces: _ _

-

three asterisks: ***

+

three asterisks: *

with spaces: * * *

three underscores: ___

with spaces: _ _ _

```

Let me know what you think.