remove unused extension
This commit is contained in:
parent
df4f942828
commit
9b83c0cc12
2 changed files with 0 additions and 9 deletions
|
@ -68,7 +68,6 @@ MD_EXTENSIONS = [FontAwesomeExtension(), 'codehilite(css_class=highlight)', 'ext
|
|||
import filters
|
||||
JINJA_FILTERS = {
|
||||
"datetime": filters.format_datetime,
|
||||
"raw": filters.html_to_raw,
|
||||
"category_find": filters.category_find,
|
||||
"limit": filters.limit
|
||||
}
|
||||
|
|
|
@ -1,18 +1,10 @@
|
|||
import iso8601
|
||||
from bs4 import BeautifulSoup
|
||||
|
||||
|
||||
def format_datetime(value):
|
||||
return iso8601.parse_date(str(value)).strftime("%x")
|
||||
|
||||
|
||||
def html_to_raw(html):
|
||||
soup = BeautifulSoup(html, "html.parser")
|
||||
for script in soup(["script", "style"]): # Remove script / style tags
|
||||
script.extract()
|
||||
return soup.get_text()
|
||||
|
||||
|
||||
def category_find(categories, name):
|
||||
for category_name, articles in categories:
|
||||
if category_name == name:
|
||||
|
|
Reference in a new issue