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

How to avoid formatting <pre> tag? #9

Open
ibnishak opened this issue Dec 1, 2018 · 3 comments
Open

How to avoid formatting <pre> tag? #9

ibnishak opened this issue Dec 1, 2018 · 3 comments

Comments

@ibnishak
Copy link

ibnishak commented Dec 1, 2018

In general, is there a way to instruct the reader not to touch a particular tag?

@Arteneko
Copy link

Arteneko commented Jan 7, 2019

I'm encountering the same problem, as I'd want to have every content inside <pre><code> tags HTML-escaped.

@RadhiFadlillah
Copy link
Collaborator

Hi guys, sorry for late response.

@ibnishak I'm sorry, but I don't think it's possible. The goal of go-readability is to find the readable content and strip all other distractions. So, if go-readability deem a tag as distractions, it will remove it.


@IvanDelsinne I'm sorry but could you elaborate on your issue ?

@ibnishak
Copy link
Author

@RadhiFadlillah My issue was exactly the same one pointed out by Ivan. When I save an article from Medium or any site with code snippets in it, the pre tag processing makes it completely unreadable. In addition, sometimes the snippets are hosted in GitHub and embedded in the article, so that iframe need be escaped too.

I understand there would be multiple cases like these for different people. So if users could pass something like an -exclude flag, that would solve the issue in general.

That is the whole of my case. If you still deem it inappropriate for the project, you may close the issue.

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