Skip to content

Commit

Permalink
Merge branch 'master' of ssh://gitlab.17zuoye.net:10022/sentinel/sims…
Browse files Browse the repository at this point in the history
…earch
  • Loading branch information
stage committed Nov 30, 2018
2 parents 38722c7 + 8b8facd commit 27850b8
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions math_quote.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import re
otomathpat = re.compile(r'\((.+?)\)')


def dealo2omath(s):
return re.sub(otomathpat, r"[imath]\1[/imath]", s)


if __name__ == '__main__':
import sys
fn = sys.argv[1]
with open(fn, 'r') as f:
line = f.readline()
print line
print dealo2omath(line)

0 comments on commit 27850b8

Please sign in to comment.