diff --git a/src/styles/global.scss b/src/styles/global.scss index 4b112c1a..98ac2bfa 100644 --- a/src/styles/global.scss +++ b/src/styles/global.scss @@ -49,9 +49,11 @@ body { &:global(.double) { height: $spc * 2; } + &:global(.quadro) { height: $spc * 4; } + &:global(.sixty) { height: $spc * 6; } @@ -83,6 +85,24 @@ body { color: #555555; } +:global { + .todo, .done { + color: #333333; + border-radius: 3px; + padding: 0 2px; + font: $font_14_semibold; + text-transform: uppercase; + } + + .todo { + background-color: $red; + } + + .done { + background-color: $green; + } +} + :global(h2) { font: $font_24_bold; } diff --git a/src/utils/dom.ts b/src/utils/dom.ts index 428b9d79..b8fb3b32 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -94,6 +94,8 @@ export const formatText = (text: string): string => ) .replace(/:\/\//gim, ':|--|') .replace(/(\/\/[^\n]+)/gim, '$1') + .replace(/\/\/\s*(todo|туду):?\s*([^\n]+)/gim, '// $1 $2') + .replace(/\/\/\s*(done|сделано|сделал|готово|fixed|пофикшено|фиксед):?\s*([^\n]+)/gim, '// $1 $2') .replace(/(\*\*[\s\S]*?\*\*)/gim, '$1') .replace(/(\_\_[\s\S]*?\_\_)/gim, '$1') .replace(/(\!\![\s\S]*?(\!\!|\n|$))/gim, '$1')