Fixups, adding yomichan-common submodule
This commit is contained in:
parent
3dfa077e08
commit
2014458e82
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
[submodule "common"]
|
||||||
|
path = common
|
||||||
|
url = https://github.com/FooSoft/yomichan-common
|
1
common
Submodule
1
common
Submodule
@ -0,0 +1 @@
|
|||||||
|
Subproject commit 9976c57247e5d65040242ddf74c871ec95629ad7
|
@ -45,7 +45,7 @@ def findSentence(content, position):
|
|||||||
quotesBwd = {u'」': u'「', u'』': u'『', u"'": u"'", u'"': u'"'}
|
quotesBwd = {u'」': u'「', u'』': u'『', u"'": u"'", u'"': u'"'}
|
||||||
terminators = u'。..??!!'
|
terminators = u'。..??!!'
|
||||||
|
|
||||||
quoteStack = list()
|
quoteStack = []
|
||||||
|
|
||||||
start = 0
|
start = 0
|
||||||
for i in xrange(position, start, -1):
|
for i in xrange(position, start, -1):
|
||||||
@ -60,7 +60,7 @@ def findSentence(content, position):
|
|||||||
elif c in quotesBwd:
|
elif c in quotesBwd:
|
||||||
quoteStack.insert(0, quotesBwd[c])
|
quoteStack.insert(0, quotesBwd[c])
|
||||||
|
|
||||||
quoteStack = list()
|
quoteStack = []
|
||||||
|
|
||||||
end = len(content)
|
end = len(content)
|
||||||
for i in xrange(position, end):
|
for i in xrange(position, end):
|
||||||
@ -83,7 +83,7 @@ def findSentence(content, position):
|
|||||||
|
|
||||||
|
|
||||||
def formatFields(fields, markup):
|
def formatFields(fields, markup):
|
||||||
result = dict()
|
result = {}
|
||||||
for field, value in fields.items():
|
for field, value in fields.items():
|
||||||
try:
|
try:
|
||||||
result[field] = value.format(**markup)
|
result[field] = value.format(**markup)
|
||||||
|
Loading…
Reference in New Issue
Block a user