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

部分 html 标签产生空格 #164

Open
Songkeys opened this issue Jul 25, 2020 · 2 comments
Open

部分 html 标签产生空格 #164

Songkeys opened this issue Jul 25, 2020 · 2 comments

Comments

@Songkeys
Copy link

Songkeys commented Jul 25, 2020

遇到的問題

我直接转换 html string:

html 中的 <> 的左右两侧如果是中西文,那么会被左右空格隔开:

<p>一行文本</p> <p>文字<strong>加粗</strong></p>

会变成

<p > 一行文本</p> <p >文字 < strong > 加粗</strong></p>

而一旦出现 < strong > 的情况,html string 最终的生成效果将会失效。

@karakarasuuuu
Copy link

我想我遇到的問題跟這個應該差不多。
在瀏覽維基百科的條目的時候,很常會在其他條目的連結前多一個空格。
我推論可能是在原始碼有符號在中文後面,所以加上了空格,但實際上該符號會被渲染成連結。
image
但這個問題似乎不是必然發生的,可以看到上圖裡維基媒體基金會前面有空格,但線上百科全書沒有。

@sunnymiu
Copy link

我想我遇到的問題跟這個應該差不多。
在瀏覽維基百科的條目的時候,很常會在其他條目的連結前多一個空格。
我推論可能是在原始碼有符號在中文後面,所以加上了空格,但實際上該符號會被渲染成連結。
image
但這個問題似乎不是必然發生的,可以看到上圖裡維基媒體基金會前面有空格,但線上百科全書沒有。

有趣的是看過了源文件,維基基金和線上百科兩組連結前方是沒有什麼差別的。

Screenshot 2020-11-21 at 12 57 41

話說插件啟用後我花了一分鐘才能完成載入

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

3 participants