1 Star 0 Fork 0

杨城/project_7470617

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
strip.py 466 Bytes
一键复制 编辑 原始数据 按行查看 历史
#! /usr/bin/python
import codecs
import sys
# Horrid fix because markdown2 does not respect formatting in code :(
def tidy(text):
return text.replace(u"\u00A0", " ").replace("$%", "<strong>").replace('%$','</strong>')
if __name__ == '__main__':
filename = sys.argv[1]
with codecs.open(filename, encoding='utf8') as infile:
text = tidy(infile.read())
with codecs.open(filename, 'w', encoding='utf8') as outfile:
outfile.write(text)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/gumpyang/fm2md.git
git@gitee.com:gumpyang/fm2md.git
gumpyang
fm2md
project_7470617
master

搜索帮助

344bd9b3 5694891 D2dac590 5694891