Code Monkey home page Code Monkey logo

predentation's People

Contributors

alanpearce avatar daleeidd avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

predentation's Issues

Predentation not working with h4 elements

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:

superfly-css-task-test

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">
&lt;<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">&quot;Grid&quot;</span>&gt;
  &lt;<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">&quot;Grid-cell&quot;</span>&gt;<span class="hljs-number">1</span>/<span class="hljs-number">2</span>&lt;/<span class="hljs-keyword">div</span>&gt;
  &lt;<span class="hljs-keyword">div</span> <span class="hljs-type">class</span>=<span class="hljs-string">&quot;Grid-cell&quot;</span>&gt;<span class="hljs-number">2</span>/<span class="hljs-number">2</span>&lt;/<span class="hljs-keyword">div</span>&gt;
&lt;/<span class="hljs-keyword">div</span>&gt;
      </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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.