CottageLabs/cl — pull request #109 by emanuil-tolev (2013-04-27 19:02:49+00:00)
Title: Try to fix the further issues in #107, asterisks inserted by etherpad in the markup breaking the HTML layout

Some tests of the new regex introduced to handle stand-alone asterisks:

```python
test_str1 = '*

test

'
re.sub('(^\s*\*\s*$)', '', test_str1)
# '*

test

'
# that's right, the other regex touches this, so this one should leave it alone

test_str2 = '*'
re.sub('(^\s*\*\s*$)', '', test_str2)
# ''

test_str3 = ' * '
re.sub('(^\s*\*\s*$)', '', test_str3)
# ''

# test some normal use cases for asterisks, make sure not to break normal usage
test_str4 = '* list item'
re.sub('(^\s*\*\s*$)', '', test_str4)
# '* list item'

test_str5 = ' * indented list item'
re.sub('(^\s*\*\s*$)', '', test_str5)
# ' * indented list item'

# seems like we're only deleting stand-alone ones, good
```