Skip to content

Commit

Permalink
Sort data directly from the parser
Browse files Browse the repository at this point in the history
* See #352
  • Loading branch information
valeriangalliat committed Feb 1, 2015
1 parent ab9ff50 commit 2a50008
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
3 changes: 3 additions & 0 deletions src/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const ScssCommentParser = require('scss-comment-parser');
const through = require('through2');
const concat = require('concat-stream');
const path = require('path');
const sorter = require('./sorter');
const utils = require('./utils');
const errors = require('./errors');

Expand All @@ -26,6 +27,8 @@ export default class Parser {
* Called with all found annotations except with type "unkown".
*/
postProcess(data) {
data = sorter(data);

Object.keys(this.annotations.list).forEach(key => {
let annotation = this.annotations.list[key];

Expand Down
3 changes: 0 additions & 3 deletions src/sassdoc.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ export function parseFilter(env = {}) {
let parser = new Parser(env, env.theme && env.theme.annotations);
let filter = parser.stream();

filter.promise
.then(data => sorter(data));

return filter;
}

Expand Down

0 comments on commit 2a50008

Please sign in to comment.