Skip to content

Commit

Permalink
Haml: Handle \r\n and \r in filter regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Golmote committed Aug 22, 2015
1 parent dd4989f commit bbe68ac
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions components/prism-haml.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,12 @@
}
},
'punctuation': {
pattern: /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]/,
pattern: /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/,
lookbehind: true
}
};

var filter_pattern = '((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(\\n(?:\\2[\\t ]+.+|\\s*?(?=\\n)))+';
var filter_pattern = '((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}((?:\\r?\\n|\\r)(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+';

// Non exhaustive list of available filters and associated languages
var filters = [
Expand Down
2 changes: 1 addition & 1 deletion components/prism-haml.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit bbe68ac

Please sign in to comment.