• Resolved pviz

    (@pviz)


    Hi Team,

    Hope you are well. We are wondering if there is an HTML tag similar to the data-no-optimize=”1″ tag, but when applied to a <div> component would cause LS to skip minifying the HTML content within the <div> element?

    Reason for doing this is to retain the new line & tab characters which is required for the JS to work properly. For example, in the sample code below, we want to retain the new line character between “6]” and “list_combined”, but when Minify HTML is applied new line and tab characters are all removed, causing the JS to not display it properly.

    We tried to add the data-no-optimize=”1″ into the <div> but it doesn’t work (is it only for CSS/JS?).

    
    <script type="text/javascript" src="https://cdn.datacamp.com/dcl-react-prod/dcl-react.js.gz"></script>
    <div data-datacamp-exercise="" data-lang="python">
      <code data-type="sample-code">
    list_1 = [1, 2, 3]
    list_2 = [4, 5, 6]
    
    list_combined = list_1 + list_2
    print(list_combined)
      </code>
    </div>
    

    Thanks,
    PV

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    yes , that attribute is only for JS/CSS , for HTML minify , it just process all.

    unfortunately there is no way to accomplish this , but I will pass this to our devs as feature request.

    Best regards,

    Thread Starter pviz

    (@pviz)

    Understood. We’ll turn off Minify HTML for now but would turn it on again and adding the data-no-optimization tag if dev has implemented the change.

    Thank you

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘HTML Minify no optimization tag?’ is closed to new replies.