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.

js partial syntax highlighting

See original GitHub issue

Describe the issue

js partial syntax highlighting

js

js partial syntax highlighting

Are you using highlight or highlightAuto?

no

Sample Code to Reproduce

no error:

  /* svg minify */

  gulp.task('svgMin', function() {
    return gulp.src('source/image/*.svg')
      .pipe(image({svgo: ['--enable', 'cleanupIDs', '--disable', 'convertColors']}))
      .pipe(gulp.dest('source/image'));
  });

error:

  /* svg sprite end inject */

  gulp.task('svgSprite', function() {
    const svgs = gulp.src('source/image/*.svg', {base: 'source/image'})
      .pipe(rename({prefix: 'icon-'}))
      .pipe(svgstore({inlineSvg: true}));

    function fileContents(filePath, file) {
      return file.contents.toString();
    }

    return gulp.src('source/**/*.html')
      .pipe(inject(svgs, {transform: fileContents}))
      .pipe(gulp.dest('source'));
  });

https://drive.google.com/file/d/17vO81oRGZxXrVwKp_Sc0-b4opXsyfUWb/view?usp=sharing

Expected behavior

Problem with any styles

Additional context problem star with:

    const svgs = gulp.src('source/image/*.svg', {base: 'source/image'})
      .pipe(rename({prefix: 'icon-'}))
      .pipe(svgstore({inlineSvg: true}));

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:13 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
GurovDmitriycommented, Oct 29, 2020

I set everything up. updated. Working!

1reaction
GurovDmitriycommented, Oct 29, 2020

thank you so much

Read more comments on GitHub >

github_iconTop Results From Across the Web

Partial loss of Syntax highlighting when updating to Visual ...
I just released version 2.6 of the Syntax Highlighting Pack with a fix. The fix was to remove both the JavaScript and the...
Read more >
highlight.js
Syntax highlighting for the Web ... multi-language code highlighting; available for node.js; works with any markup; compatible with any js framework.
Read more >
Syntax highlighting of javascript file in an ASP.NET MVC view?
I have an ASP.NET MVC website which has a particular javascript file that needs to be run through the razor parser to render...
Read more >
Javascript syntax highlighting does not work in VS 2017 for Mac
There is partial syntax highlighting, key words will occasionally show as a different colour, but from one line to the next there can...
Read more >
Build-Time Syntax Highlighting: Zero Client-Side JS, Support ...
Syntax highlighting so your code blocks are easier for readers to parse ; Line numbers so you can reference the code you're discussing...
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