Skip to content

Commit

Permalink
small refactoring
Browse files Browse the repository at this point in the history
  • Loading branch information
iamstarkov committed Aug 6, 2015
1 parent 8d43f57 commit fe3dce8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions index.js
@@ -1,11 +1,11 @@
import { text, html, match, isParagraph } from 'commonmark-helpers';
import trimTag from 'trim-html-tag';

const isDesc = (exclude, node) =>
const isDesc = (node, exclude) =>
isParagraph(node) && !text(node).match(exclude);

export default (input, exclude = null) => {
let node = match(input, node => isDesc(exclude, node));
let node = match(input, node => isDesc(node, exclude));
if (!node) return;
return {
text: text(node),
Expand Down

0 comments on commit fe3dce8

Please sign in to comment.