HTML Minify no optimization tag?
-
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
The topic ‘HTML Minify no optimization tag?’ is closed to new replies.