Changeset 2112
- Timestamp:
- 03/21/07 00:11:43 (2 years ago)
- Files:
-
- lotusnotesparsermacro/0.8 (added)
- lotusnotesparsermacro/0.8/notes.py (moved) (moved from lotusnotesparsermacro/notes.py) (3 diffs)
- lotusnotesparsermacro/0.9 (added)
- lotusnotesparsermacro/0.9/notes.py (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
lotusnotesparsermacro/0.8/notes.py
r604 r2112 14 14 15 15 def parse(hdf, txt, env): 16 txt = txt.lstrip(); 16 req = None 17 18 txt = txt.lstrip() 17 19 if (0 == len(txt)): 18 20 return "" 19 21 20 22 html = "" 21 match = re.search(r"^(from:?\s+?)?(.*)$\s+?^(sent:?\s*)?(.*)$\s+?^ to:?\s+?(.*)$\s+?^(cc:?\s+?(.*)$\s+?)?^subject:?\s+(.*)$", txt, re.IGNORECASE | re.MULTILINE)23 match = re.search(r"^(from:?\s+?)?(.*)$\s+?^(sent:?\s*)?(.*)$\s+?^\s*to:?\s+?(.*)$\s+?^(\s*cc:?\s+?(.*)$\s+?)?^\s*subject:?\s+(.*)$", txt, re.IGNORECASE | re.MULTILINE) 22 24 if match: 23 25 if (-1 == match.start(1)): … … 35 37 content = match.string[match.end(8):] 36 38 else: 37 return wiki_to_html(txt, env, hdf, env.get_db_cnx(), escape_newlines=True)39 return wiki_to_html(txt, env, req, escape_newlines=True) 38 40 39 41 html = '%s<br />'\ … … 41 43 '<legend style="%s">%s</legend>'\ 42 44 'From: %s<br />'\ 43 'To: %s<br />' % (wiki_to_html(pre_content, env, hdf, env.get_db_cnx(), escape_newlines=True),45 'To: %s<br />' % (wiki_to_html(pre_content, env, req, escape_newlines=True), 44 46 STYLE, 45 47 STYLE,
