From 9b83c0cc128e49fab9b970d2c96970558250e56a Mon Sep 17 00:00:00 2001 From: RealOrangeOne Date: Sat, 25 Jun 2016 14:06:35 +0100 Subject: [PATCH] remove unused extension --- pelicanconf.py | 1 - plugins/filters.py | 8 -------- 2 files changed, 9 deletions(-) diff --git a/pelicanconf.py b/pelicanconf.py index a487901..768cf07 100644 --- a/pelicanconf.py +++ b/pelicanconf.py @@ -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 } diff --git a/plugins/filters.py b/plugins/filters.py index 1e3e4ec..a778c89 100644 --- a/plugins/filters.py +++ b/plugins/filters.py @@ -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: