Skip to content

Commit

Permalink
Tighten remove front-matter comments regex (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
XhmikosR authored Apr 10, 2023
1 parent 0a18a23 commit 0e49567
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,8 @@ const parseFileSync = (file, options) => {
};

const parseData = (fileName, sassFileString, options) => {
// Remove jekyll comments
if (sassFileString.includes('---')) {
sassFileString = sassFileString.replace(/---/g, '');
}
// Remove (Jekyll, YAML) front-matter comments
sassFileString = sassFileString.replace(/^---$/gm, '');

const variables = parse(fileName, sassFileString, options.ignore);

Expand Down

0 comments on commit 0e49567

Please sign in to comment.