daleeidd / predentation Goto Github PK
View Code? Open in Web Editor NEWA node.js stream that removes indentation from the `pre` tag
License: MIT License
A node.js stream that removes indentation from the `pre` tag
License: MIT License
Hello,
Thank you for making predentation. It's exactlly what I need.
I'm running into a strange issue. I've create a gulp task that uses predentation
. It first does some syntax highlighting, then uses predentation to remove the white space inside the pre tag. The repository containing the task is here:
If I run the task on the following text, contained in the repository:
<pre class="Test-markup">
<code class="html">
<div class="Grid">
<div class="Grid-cell">1/2</div>
<div class="Grid-cell">2/2</div>
</div>
</code>
</pre>
I get the expected result (Syntax highlighted):
<pre class="Test-markup">
<code class="html">
<<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">"Grid"</span>>
<<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">"Grid-cell"</span>><span class="hljs-number">1</span>/<span class="hljs-number">2</span></<span class="hljs-keyword">div</span>>
<<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">"Grid-cell"</span>><span class="hljs-number">2</span>/<span class="hljs-number">2</span></<span class="hljs-keyword">div</span>>
</<span class="hljs-keyword">div</span>>
</code>
</pre>
However it does not work on this content:
<h4>u-color-background-gray-100</h4>
<div class="u-color-background-gray-100 transparent-test-block">
</div>
<h4>u-color-background-gray-300</h4>
<div class="u-color-background-gray-300 transparent-test-block">
If I remove the first h4 element it works. Thoughts?
TIA,
Ole
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.