Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

建议优化一下 Gmeek-html 转换的匹配规则 #201

Open
GJKen opened this issue Nov 14, 2024 · 2 comments
Open

建议优化一下 Gmeek-html 转换的匹配规则 #201

GJKen opened this issue Nov 14, 2024 · 2 comments

Comments

@GJKen
Copy link

GJKen commented Nov 14, 2024

遇到在 markdown 的如下内容:

image

会被转换掉导致显示不出来:

image

Gmeek.py 建议的改动:

        if '<code class="notranslate">Gmeek-html' in post_body:
            post_body = re.sub(r'<code class="notranslate">Gmeek-html(&lt;.*?&gt;)</code>', lambda match: html.unescape(match.group(1)), post_body, flags=re.DOTALL)
@Meekdai
Copy link
Owner

Meekdai commented Nov 14, 2024

我的建议是你要在文章中说明Gmeek-html的时候不要添加“``”这个符号即可。因为Gmeek-html这是个特定词,一般人根本不会在文章中写。

@GJKen
Copy link
Author

GJKen commented Nov 14, 2024

行吧打扰了, 我自己改
因为我在做记录gmeek的笔记, 所以遇到了这个问题

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants