mirror of
https://expo.survex.com/repositories/troggle/.git
synced 2024-11-22 07:11:52 +00:00
[svn] Converted <p> tags to wiki style "\n\n"
Tidied header Copied from http://cucc@cucc.survex.com/svn/trunk/expoweb/troggle/, rev. 8063 by julian @ 11/6/2008 11:29 PM
This commit is contained in:
parent
f536963d00
commit
b33061a3ce
@ -1,12 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import sys
|
||||
sys.path.append('C:\\Expo\\expoweb\\troggle\\')
|
||||
import settings
|
||||
import expo.models as models
|
||||
import csv
|
||||
import time
|
||||
|
||||
#import sqlite3
|
||||
import re
|
||||
import os
|
||||
|
||||
@ -88,8 +86,9 @@ def html_to_wiki(text):
|
||||
#if s:
|
||||
# print s.groups()
|
||||
#Lists
|
||||
text = re.sub("^</p>(.*)", r"\1", text)
|
||||
text = re.sub("(.*)<p>$", r"\1", text)
|
||||
text = re.sub("</p>", r"", text)
|
||||
text = re.sub("<p>$", r"", text)
|
||||
text = re.sub("<p>", r"\n\n", text)
|
||||
out = ""
|
||||
lists = ""
|
||||
while text:
|
||||
|
Loading…
Reference in New Issue
Block a user