Comments (11)
I always do it. The example provided is not written by me, it was just found on the net. 😄 Cool. I'll be waiting for updates. Thanks, and thanks for the great job Zach!
from just-read.
Just a note: if there's a section of code that is only inside of a <pre>
tag that you really need to be formatted, you can use your dev tools to add the <code>
tag surrounding that content before running Just Read. Since it grabs the page at the time when it's ran, Just Read will include the <code>
in its version.
from just-read.
Can you please provide an example page where this error occurs?
Are you talking about just plain <code>
tags without a <pre>
tag surrounding it?
from just-read.
Hmmm I see now, the article has no code tag embedded into the pre content so it should had bypassed it. BTW, text inside a pre tag should be formatted as it is stated. It's not relative to the code tag (if we want to avoid this kind of problems). You could extract the code from this article: http://elmanantialdebits.blogspot.com.es/2013/08/que-es-eso-de-la-programacion-asincrona.html
from just-read.
Thanks for bringing this up. This behavior was purposely implemented. <pre>
tags with no <code>
inside of them are converted to <p>
tags in Just Read's format.
This is done because some sites that I've come across (unfortunately I didn't save the link(s)) put regular types of text content inside of the <pre>
tag. Since Just Read is meant to take all formatting away from article type of content, I convert it to a <p>
tag so that the browser's styling is removed.
With that being said, if you come across several sites where this is an issue, where the <pre>
formatting is actually needed, I'm open to changing the way the <pre>
s are handled.
With that being said, there's a small error in how the line breaks of <pre>
s are handled on that page - they should have the same number of lines as the <pre>
tags, just in <p>
s instead. I'll look into what's causing that issue.
from just-read.
Update: The error in handling line breaks inside of <pre>
s should be fixed as of b2c7227 / version 1.0.2. Let me know if that is satisfactory for your use case.
from just-read.
Line breaks work well now for the example provided, but it keeps bypassing indenting.
With Just Read ON it shows this now, as you can see:
leer_teclado_asincrono(t => {
leer_fichero_asincrono(f => {
leer_datos_asincrono(d => {
imprime(t,f,d)
})
})
})
from just-read.
For now I will keep the functionality as it was originally designed for the reasons stated above.
If you're writing pages that use code, make sure to use the <code>
element!
from just-read.
This breaks code blocks in any site that uses MediaWiki - like Wikipedia, etc... See this page for an example: https://en.wikipedia.org/wiki/Web_storage#sessionStorage
The code blocks on Wikipedia are just <pre>
tags, not <pre><code>
, so they get borked.
Would be nice if there was a setting for this - "Keep <pre>
tags" or something.
from just-read.
I added the ability for users to choose whether or not to reformat <pre>
tags in "Additional options" on the Options page as of version 1.0.14.
Thanks for the comment!
from just-read.
from just-read.
Related Issues (20)
- cannot load images because "blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource." HOT 1
- text-decoration doesn't seem to work HOT 3
- Option to remove floating icon to "add a comment" HOT 1
- RSS feed for shared pages HOT 2
- Share Article button not working HOT 8
- Removing highlight colour instead of text HOT 2
- Reddit is Borked HOT 2
- Add ChatGPT summarization on click HOT 21
- Works great but does not support 'Auto Copy' extension HOT 1
- icon menu ‘select content to read’ lost in ver5.3.1 HOT 1
- Coding section not support HOT 1
- Small SVG blown up to large white block HOT 3
- Code blocks are condensed into one line HOT 4
- Comic Dak Mode
- Wrong text extracted from page on defenseone.com HOT 2
- allow to specify the openai API endpoint base url HOT 2
- Just Read fails to open due to invalid HTML attribute HOT 5
- Let Summarizer handle additional response types HOT 7
- Theme switching doesn't work (6.0.4) HOT 2
- Please add missing LICENSE HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.