style and link tags not removed
See original GitHub issueThis is the original HTML:
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="./styles.css">
</head>
And this is the result:
<head>
<meta charset="utf-8">
<title></title>
<link rel="stylesheet" href="./styles.css">
</head>
Same thing with <style>
tags. The styles are inlined, but the tags are not removed from the result HTML.
const options = {
removeStyleTags: true
};
let result = juice.inlineContent(originalFile, stylesFile, options);
Supposedly removeStyleTags
is true
by default but I added it to see if it made any difference.
Am I missing something?
Issue Analytics
- State:
- Created 5 years ago
- Comments:5
Top Results From Across the Web
Remove ALL styling/formatting from hyperlinks
I'm creating a navigation menu with words with different colors ( href links). I would like ...
Read more >How to Remove Underline from a Link in CSS
How to Remove Underline from a Link in CSS ... Firstly, it is important to know that the link tag (anchor tag) can...
Read more >Styling links - Learn web development | MDN
Default styles · Use underlining for links, but not for other things. If you don't want to underline links, at least highlight them...
Read more >How to Remove the Underline from Links in CSS
To remove the underline from links, you can use the CSS text-decoration property. Below we'll walk through how to define this property to ......
Read more >Removing Link Icons - Web Guide
Home / User Guide / Styling Content / Removing Link Icons ... <a class="no-icon" href="https://www.med.unc.edu/webguide/wp-content/uploads/sites/419/2019/07 ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
My understanding is that this actually works as intended.
From the README:
juice.inlineContent(html, css [, options])
This takes html and css and returns new html with the provided css inlined. It does not look at
<style>
or<link rel="stylesheet">
elements at all.So yes, it inlines the styles, but doesn’t touch the tags they’re in. Maybe the last sentence in the description there is a bit vague?
The last sentence could definitely be more explicit, I also misunderstood it.