-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing space after inline comment #1942
Comments
👍 |
I would accept a pull request for this. |
Interestingly, we currently let you not put a space on either side via: //build:css static/styles/lib.css <!--build:css static/styles/lib.css--> and you can put a space on both sides by adding a trailing space (I realise this is not ideal). Anything we change here would give people less control over where they put white space around comments, which makes me unsure that we should change this. It seems to me that the gulp plugins could be easily fixed. |
👍 I'm running into this exact issue as well. Trying to use Trying to do:
and the output is:
I also tried putting a trailing space behind |
@dwilt said:
Can't reproduce that here doctype
html
head
// build:css css/combined.css
link(rel='stylesheet' href='css/one.css')
link(rel='stylesheet' href='css/two.css')
// endbuild
body
// build:js scripts/combined.js
script(type='text/javascript' src='scripts/one.js')
script(type='text/javascript' src='scripts/two.js')
// endbuild <!DOCTYPE html>
<html>
<head>
<!-- build:css css/combined.css -->
<link rel="stylesheet" href="css/one.css">
<link rel="stylesheet" href="css/two.css">
<!-- endbuild -->
</head>
<body>
<!-- build:js scripts/combined.js -->
<script type="text/javascript" src="scripts/one.js"></script>
<script type="text/javascript" src="scripts/two.js"></script>
<!-- endbuild -->
</body>
</html> (example from gulp-useref) |
@TimothyGu Yes, I just discovered that when I put in a file path (in your example |
Putting a trailing space at the end of the line is not allowed in my editor, and I think it's not a best practice, seems the best way to fix this issue is file a issue on the repo of |
+1. Closing. |
If I'm in dev environment, I don't want to combine scripts, so... I solved that with a spance after inline commented. See it below:
and the output is:
I follow the steps below and work correctly: https://github.com/paislee/healthy-gulp-angular Enjoy! |
// build:css static/styles/lib.css
=><!-- build:css static/styles/lib.css-->
The correct comment should be
<!-- build:css static/styles/lib.css -->
, notice the space afterlib.css
. This is a minor issue, but sometimes it can cause gulp-useref failed to inject the js/css into the html file. This issue is also reported in gulp-inject repo, see klei/gulp-inject#56Could you consider to add a extra space after inline comment?
The text was updated successfully, but these errors were encountered: