Fix so ships_CHARS and sort_ships_splits work together.

This commit is contained in:
Jim Miller
2016-01-06 17:39:31 -06:00
parent 4bd288c3ac
commit 191e13bfad
3 changed files with 12 additions and 11 deletions
+3 -5
View File
@@ -380,11 +380,9 @@ sort_ships:false
## ships entry and then, after => the string to use to merge the parts
## back together. \s == blank space.
## Each part will have replace_metadata with key ships_CHARS applied.
## By default, sort_ships_splits:/=>/
## Here's possible an example for AO3:
#sort_ships_splits:
# [ ]*/[ ]*=>/
# [ ]*&[ ]*=>\s&\s
sort_ships_splits:
[ ]*/[ ]*=>/
[ ]*&[ ]*=>\s&\s
## join_string_<entry> options -- FanFicFare list entries are comma
## separated by default. You can use this to change that. For example,
+3 -5
View File
@@ -379,11 +379,9 @@ sort_ships:false
## ships entry and then, after => the string to use to merge the parts
## back together. \s == blank space.
## Each part will have replace_metadata with key ships_CHARS applied.
## By default, sort_ships_splits:/=>/
## Here's possible an example for AO3:
#sort_ships_splits:
# [ ]*/[ ]*=>/
# [ ]*&amp;[ ]*=>\s&amp;\s
sort_ships_splits:
[ ]*/[ ]*=>/
[ ]*&amp;[ ]*=>\s&amp;\s
## join_string_<entry> options -- FanFicFare list entries are comma
## separated by default. You can use this to change that. For example,
+6 -1
View File
@@ -816,10 +816,15 @@ class Story(Configurable):
for x in retlist:
curlist = []
for y in re.split(splitre,x):
## logger.debug("x:(%s) y:(%s)"%(x,y))
## for SPLIT_META(\,)
if doreplacements:
if x != y and doreplacements: # doreplacements always true here (currently)
y = self.doReplacements(y,'ships_CHARS',return_list=True)
else:
## needs to be a list to extend curlist.
y=[x]
curlist.extend(y)
## logger.debug("curlist:%s"%(curlist,))
newretlist.append( splitmerge.join(sorted(curlist)) )
retlist = newretlist