question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

option to ignore section or line in html

See original GitHub issue

I’m using a lodash template with a custom tag set to [[ and ]] to prevent tags set with gulp from interfering with normal mustache tags.

Beautify is breaking one of these apart:

<script type="text/javascript">
  var defaults = [[- JSON.stringify(defaults, null, '\t') ]];
</script>

To:

<script type="text/javascript">
  var defaults = [
    [-JSON.stringify(defaults, null, '\t')]
  ];
</script>

I’ve tried to set the unformatted list for html in the .jsbeautifyrc but that didn’t seem to have any effect.

Is there a way to prevent beautify from splitting this line? It would be nice to have a ignore line style comment similar to jshint or htmlhint. Perhaps adding another set of tags to the mustache support, so it could use {{ as well as [[.

Thx

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
bitwisemancommented, Jun 16, 2015

This has been implemented for javascript beautifier in #384. It addresses the issue as reported but I’m leaving this one open to track implementation on the html side.

Read more comments on GitHub >

github_iconTop Results From Across the Web

The best way to skip a line in html? - Stack Overflow
If you literally need to skip a line, that is, have a empty line with nothing on it in your text, then by...
Read more >
How To Disable Text Selection in HTML/CSS - W3Schools
You can use the user-select property to disable text selection of an element. In web browsers, if you double-click on some text it...
Read more >
The HTML Option element - MDN Web Docs - Mozilla
The HTML element is used to define an item contained in a , an , or a element. As such, can represent menu...
Read more >
How To Prevent Line Breaks Using CSS - DigitalOcean
In this tutorial prevent line breaks using CSS's white-space property. You will achieve this using three different configurations.
Read more >
The Dos and Don'ts of Adding an HTML Line Break
To do a line break in HTML, use the <br> tag. Simply place the tag wherever you want to force a line break....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found