Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def tag_plain_list(self, tag_list, input):
- width = str()
- for tag, tag_offset, tag_data_offset, next_tag_offset in tag_list:
- if self.Valuable_tags(tag):
- if self.is_tag(tag_data_offset, input) == "tag":
- pass
- elif self.is_tag(tag_data_offset, input) == "data":
- w, pict_of = self.is_pictag(tag, tag_offset)
- if pict_of:
- if w == 'w':
- width = input[pict_of:tag_data_offset]
- elif w == 'h':
- yield "( %s x %s image)" %(width, input[pict_of:tag_data_offset])
- else:
- plain_data = input[tag_data_offset:next_tag_offset - 1]
- if plain_data.startswith('\\'):
- plain_data = plain_data.replace(r"'", r"x")
- yield plain_data.decode('string-escape')
- else:
- yield plain_data
- else:
- continue
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement