javascript - Markdown to HTML w/ syntax highlighting using Gulp -


i'm using gulp-markdown package render markdown file html partial. (it uses npm marked package actual rendering.) renders fine, except code blocks!! how gulp put out correctly formatted html?

here gulp:

var gulp      = require('gulp'); var markdown  = require('gulp-markdown'); markdown.marked.setoptions({   renderer: new markdown.marked.renderer(),   gfm: true,   tables: true,   breaks: false,   pedantic: false,   sanitize: true,   smartlists: true,   smartypants: false });  // turn md files html partials gulp.task('blogposts', function () {     return gulp.src('src/blog/blogone.md')         .pipe(markdown())         .pipe(gulp.dest('src/partials')); }); 

and here markdown:

```javascript app.controller('displaycontroller', ['$scope', 'clogsservice', function($scope, clogsservice){   $scope.clogs = [];   $scope.getclogs = function() {     clogservice.getclogs()       .then(function(response){         clogsservice.clogs = response.data;           $scope.clogs = clogsservice.clogs;       });     }; }) ``` 

here output html:

<pre><code>app.controller(&#39;displaycontroller&#39;, [&#39;$scope&#39;, &#39;clogsservice&#39;, function($scope, clogsservice){   $scope.clogs = [];   $scope.getclogs = function() {     clogservice.getclogs()       .then(function(response){         clogsservice.clogs = response.data;           $scope.clogs = clogsservice.clogs;       });     }; }) </code></pre> 

my page renders this: enter image description here

how page render code blocks correctly syntax highlighting?


Comments

Popular posts from this blog

php - Wordpress website dashboard page or post editor content is not showing but front end data is showing properly -

javascript - Get parameter of GET request -

javascript - Twitter Bootstrap - how to add some more margin between tooltip popup and element -