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

内容是JS的代码块,存储为html标签的形式,解析html形式后被存到一行中,没换行 #281

Open
HhxtoN opened this issue Mar 26, 2024 · 6 comments

Comments

@HhxtoN
Copy link

HhxtoN commented Mar 26, 2024

image
原本的内容如上图,towxml解析之后变为
image
全部内容都挤在了这一行,同时没有代码高亮,同时,看页面结构,可以看到是有解析的,但是为什么堆一起了,还是说需要我改源码
image
希望有大佬能帮我看看,是我哪里处理没对嘛

@sbfkcel
Copy link
Owner

sbfkcel commented Apr 1, 2024

参考demo中的解析示例。

@HhxtoN
Copy link
Author

HhxtoN commented Apr 2, 2024

参考demo中的解析示例。
image
Uploading image.png…
demo中演示的是markdown格式,我看不出来html格式是否存在相同的问题,我的是使用html标签的形式,并且demo中只使用了这么一句语句,我也知道要把这语句中的markdown改成html,但是就是编译html的代码块全部堆成一行了

@HhxtoN
Copy link
Author

HhxtoN commented Apr 2, 2024

参考demo中的解析示例。
image
希望你帮我能看看,是html兼容性问题还是什么问题呢

@HhxtoN
Copy link
Author

HhxtoN commented Jun 5, 2024

解决了!
是css源码中h2__code记得将换行样式加上即可
image

@sbfkcel
Copy link
Owner

sbfkcel commented Jun 7, 2024

应该是你的内容里面有 code 标签,跟towxml的实际有冲突。

不过我不是很建议这么修改。

@HhxtoN
Copy link
Author

HhxtoN commented Jun 26, 2024

应该是你的内容里面有 code 标签,跟towxml的实际有冲突。

不过我不是很建议这么修改。

因为使用别的Markdown插件生成的文章,所以转换过来的时候会有一些固定的标签。
我没法对生成文章内容插件进行改动,目前只好这样解决问题,不知道这么改后续会出现什么问题

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