Skip to content

Commit

Permalink
Remove section numbers (#515)
Browse files Browse the repository at this point in the history
* Remove section numbers from TOC

* Remove dividers from TOC
  • Loading branch information
mwvolo authored and RoyEJohnson committed Oct 26, 2017
1 parent dad19bd commit 14ad220
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions books/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@

def cleanhtml(raw_html):
remove_numbers = re.sub('<span class=\W*(os-number)\W*>.*?>', '', raw_html)
remove_dividers = re.sub('<span class=\W*(os-divider)\W*>.*?>', '', remove_numbers)
cleanr = re.compile('<.*?>')
cleantext = re.sub(cleanr, '', remove_numbers)
print(cleantext)
cleantext = re.sub(cleanr, '', remove_dividers)
return cleantext


class Quotes(models.Model):
quote_text = RichTextField()
quote_author = models.CharField(max_length=255)
Expand Down

0 comments on commit 14ad220

Please sign in to comment.