summaryrefslogtreecommitdiffstats
path: root/utils.py
diff options
context:
space:
mode:
authorPhilip Sargent <philip.sargent@klebos.com>2020-07-26 02:26:04 +0100
committerPhilip Sargent <philip.sargent@klebos.com>2020-07-26 02:26:04 +0100
commit924c5a3bf8469e8b0c7deed3dabc4a583f1f2e08 (patch)
treeb4f6b8809230f2f3ee82fec9a2ec6e44806f0bf3 /utils.py
parent809633bdd3c70159312a9b22de54dfdeffd325e0 (diff)
downloadtroggle-924c5a3bf8469e8b0c7deed3dabc4a583f1f2e08.tar.gz
troggle-924c5a3bf8469e8b0c7deed3dabc4a583f1f2e08.tar.bz2
troggle-924c5a3bf8469e8b0c7deed3dabc4a583f1f2e08.zip
Delete commented-out code
Diffstat (limited to 'utils.py')
-rw-r--r--utils.py18
1 files changed, 1 insertions, 17 deletions
diff --git a/utils.py b/utils.py
index 7bf57fa..9d41fdb 100644
--- a/utils.py
+++ b/utils.py
@@ -5,7 +5,7 @@ import logging
from django.conf import settings
from django.shortcuts import render
-#from troggle.core.models_caves import CaveDescription
+
"""Oddball mixture of critical, superfluous and useful functions which should
be re-located more sensibly to other modules:
@@ -113,22 +113,6 @@ def get_single_match(regex, text):
else:
return None
-# def href_to_wikilinks(matchobj):
- # """
- # Given an html link, checks for possible valid wikilinks.
-
- # Returns the first valid wikilink. Valid means the target
- # object actually exists.
- # """
- # res=CaveDescription.objects.filter(long_name__icontains=matchobj.groupdict()['text'])
- # if res and res[0]:
- # return r'[[cavedescription:'+res[0].short_name+'|'+res[0].long_name+']]'
- # else:
- # return matchobj.group()
- # #except:
- # #print 'fail'
-
-
re_subs = [(re.compile(r"\<b[^>]*\>(.*?)\</b\>", re.DOTALL), r"'''\1'''"),
(re.compile(r"\<i\>(.*?)\</i\>", re.DOTALL), r"''\1''"),
(re.compile(r"\<h1[^>]*\>(.*?)\</h1\>", re.DOTALL), r"=\1="),