diff --git a/src/components/comment/CommentTextBlock/styles.scss b/src/components/comment/CommentTextBlock/styles.scss index 6a14f11c..b3430bc6 100644 --- a/src/components/comment/CommentTextBlock/styles.scss +++ b/src/components/comment/CommentTextBlock/styles.scss @@ -7,8 +7,23 @@ position: relative; color: #cccccc; word-break: break-word; + width: 100%; b { - font-weight: 600; + font-weight: 900; + } + + i { + font-style: italic; + } + + hr { + height: 1px; + background: rgba(255, 255, 255, 0.1); + border: none; + } + + :global(.green) { + color: $wisegreen; } } diff --git a/src/utils/dom.ts b/src/utils/dom.ts index 3d658418..21a1dfbd 100644 --- a/src/utils/dom.ts +++ b/src/utils/dom.ts @@ -94,7 +94,11 @@ export const formatText = (text: string): string => ) .replace(/:\/\//gim, ':|--|') .replace(/(\/\/[^\n]+)/gim, '$1') + .replace(/(\*\*[\s\S]*?\*\*)/gim, '$1') + .replace(/(\_\_[\s\S]*?\_\_)/gim, '$1') + .replace(/(\!\![\s\S]*?(\!\!|\n|$))/gim, '$1') .replace(/(\/\*[\s\S]*?\*\/)/gim, '$1') + .replace(/([=|-]{5,})/gim, '
') .replace(/:\|--\|/gim, '://') .split('\n') .filter(el => el.trim().length)