Skip to content

Commit

Permalink
line
Browse files Browse the repository at this point in the history
  • Loading branch information
Shirtiny committed Jan 29, 2023
1 parent b6cbd20 commit 86283cf
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 8 additions & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,11 @@ const sh_log = new ShLogger();
export { theme, ShLogger, css, Logger, LEVELS };

export default sh_log;

const r = css`
background-color: #292F4C;
color: white;
padding: 2px 5px;
`;

r;
2 changes: 1 addition & 1 deletion src/style/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Shape, Slider } from "./shape";
type Text = string | number;

const line = (str?: string) => {
return str ? str.replace(/\s*(;|\{|\})+\s*[\n\r]*/g, "$1") : "";
return str ? String(str).trim().replace(/\s*(;|\{|\})+\s*[\n]*[\n\r]*/g, "$1") : "";
};

export const css = (literals: TemplateStringsArray, ...values: Text[]) => {
Expand Down

0 comments on commit 86283cf

Please sign in to comment.