Skip to content

Commit

Permalink
fix:(tools) fix whitespaces again (#1855)
Browse files Browse the repository at this point in the history
  • Loading branch information
vladitasev committed Jun 23, 2020
1 parent a3a4558 commit 7ae6293
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions packages/tools/lib/hbs2lit/src/compiler.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ const svgProcessor = require("./svgProcessor");

const removeWhiteSpaces = (source) => {
return source
.replace(/\n+/g, "")
.replace(/\s*<\s*/g, "<")
.replace(/\s*>\s*/g, ">")
.replace(/}}\s+{{/g, "}}{{")
.replace(/\t+/g, " ");
.replace(/\s*\r*\n+\s*/g, " ") // Replace new lines and all whitespace between them with a space
.replace(/\s*<\s*/g, "<") // Strip whitespace round <
.replace(/\s*>\s*/g, ">") // Strip whitespace round >
.replace(/}}\s+{{/g, "}}{{"); // Remove whitespace between }} and {{
};

const compileString = async (sInput, config) => {
Expand Down

0 comments on commit 7ae6293

Please sign in to comment.