1

Fixups, adding yomichan-common submodule

This commit is contained in:
Alex Yatskov 2016-05-08 12:05:32 -07:00
parent 3dfa077e08
commit 2014458e82
3 changed files with 7 additions and 3 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "common"]
path = common
url = https://github.com/FooSoft/yomichan-common

1
common Submodule

@ -0,0 +1 @@
Subproject commit 9976c57247e5d65040242ddf74c871ec95629ad7

View File

@ -45,7 +45,7 @@ def findSentence(content, position):
quotesBwd = {u'': u'', u'': u'', u"'": u"'", u'"': u'"'}
terminators = u'。..?!'
quoteStack = list()
quoteStack = []
start = 0
for i in xrange(position, start, -1):
@ -60,7 +60,7 @@ def findSentence(content, position):
elif c in quotesBwd:
quoteStack.insert(0, quotesBwd[c])
quoteStack = list()
quoteStack = []
end = len(content)
for i in xrange(position, end):
@ -83,7 +83,7 @@ def findSentence(content, position):
def formatFields(fields, markup):
result = dict()
result = {}
for field, value in fields.items():
try:
result[field] = value.format(**markup)