equal
deleted
inserted
replaced
6 |
6 |
7 def get_text_nodes(soup): |
7 def get_text_nodes(soup): |
8 return soup(text=lambda text:not isinstance(text, Comment)) |
8 return soup(text=lambda text:not isinstance(text, Comment)) |
9 |
9 |
10 def is_real_text_node(textNode): |
10 def is_real_text_node(textNode): |
|
11 if textNode.string == "\n": |
|
12 return False |
11 return not textNode.findParent('style') |
13 return not textNode.findParent('style') |
12 |
14 |
13 def get_the_soup(input): |
15 def get_the_soup(input): |
14 return BeautifulSoup(input, convertEntities=BeautifulSoup.ALL_ENTITIES) |
16 return BeautifulSoup(input, convertEntities=BeautifulSoup.ALL_ENTITIES) |
15 |
17 |