mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Use ordereddict instead of set
This commit is contained in:
parent
48f1d5c960
commit
aa267b047a
1 changed files with 2 additions and 2 deletions
|
|
@ -26,12 +26,12 @@ from six.moves.html_parser import HTMLParser
|
|||
from pelican import signals
|
||||
from pelican.contents import Page, Category, Tag, Author
|
||||
from pelican.utils import get_date, pelican_open, FileStampDataCacher, SafeDatetime, posixize_path
|
||||
|
||||
from collections import OrderedDict
|
||||
|
||||
def strip_split(text, sep=','):
|
||||
"""Return a list of stripped, non-empty substrings, delimited by sep."""
|
||||
items = [x.strip() for x in text.split(sep)]
|
||||
return list(set([x for x in items if x]))
|
||||
return list(OrderedDict.fromkeys([x for x in items if x]))
|
||||
|
||||
|
||||
# Metadata processors have no way to discard an unwanted value, so we have
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue