diff options
| author | Orf <tom@tomforb.es> | 2013-07-30 11:08:30 +0100 |
|---|---|---|
| committer | Orf <tom@tomforb.es> | 2013-07-30 11:08:30 +0100 |
| commit | 0613cbc26d968d94745200caad673448cc8c0286 (patch) | |
| tree | e09b354b1c4264c5fd18a197fc70637679fcf011 /src/lxml/html/diff.py | |
| parent | efeccc01ef4e0b5036394c50e186e6cb8ad084bf (diff) | |
| download | python-lxml-0613cbc26d968d94745200caad673448cc8c0286.tar.gz | |
Regex now pulls all whitespace, href_tag now sets trailing_whitespace correctly and the tests should run on py3k
Diffstat (limited to 'src/lxml/html/diff.py')
| -rw-r--r-- | src/lxml/html/diff.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lxml/html/diff.py b/src/lxml/html/diff.py index 0c152f08..89838a86 100644 --- a/src/lxml/html/diff.py +++ b/src/lxml/html/diff.py @@ -602,7 +602,7 @@ def fixup_chunks(chunks): elif chunk[0] == 'href': href = chunk[1] - cur_word = href_token(href, pre_tags=tag_accum, trailing_whitespace=None) + cur_word = href_token(href, pre_tags=tag_accum, trailing_whitespace=" ") tag_accum = [] result.append(cur_word) continue @@ -713,7 +713,7 @@ def flatten_el(el, include_hrefs, skip_tag=False): for word in end_words: yield html_escape(word) -split_words_re = re.compile(r'\S+(?:\s|$)') +split_words_re = re.compile(r'\S+(?:\s+|$)') def split_words(text): """ Splits some text into words. Includes trailing whitespace |
