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 2, 2015
1 parent d4bd4b3 commit 0a4424a
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
@@ -1,6 +1,7 @@
import { defer } from './utils';
import * as errors from './errors';
import AnnotationsApi from './annotation';
import sorter from './sorter';

const ScssCommentParser = require('scss-comment-parser');
const through = require('through2');
Expand All @@ -27,6 +28,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
Expand Up @@ -36,9 +36,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 0a4424a

Please sign in to comment.