Skip to content

Commit

Permalink
FEAT(client,Markdown): Add further Markdown support including lists
Browse files Browse the repository at this point in the history
Adds the following features:
- Underline text
- Reference links and reference images
- Combinable formatting, such as emphasis on links and images in lists or tables
- Strikethrough text changed to require having no more surrounding tildes
- Block quotes support subquotes and have a container with padding and colors in both Lite and Dark theme
- Superscript and subscript text
- Unordered and ordered lists
- Description lists
- Images and linked images
- Tables
- Thematic breaks
- Centered blocks
- Multiple code blocks per message
- Code blocks and inline code may use additional signature characters to include more such characters in the text
- Code blocks may use triple tildes or indents on each line with at least 4 spaces instead
- Code blocks and inline code have padding (with just fixed spaces for inline code) and colors in both Lite and Dark theme as well as support for adding syntax highlighting in the future
- Colored text via LaTeX or HTML
- Fixed spaces via HTML
- Linebreaks via Markdown or HTML and regular linebreaks come as double or none (single linebreaks are collapsed into one space)
- Removal of HTML comments in output (as with the rest, text remains as-is in inline code or code blocks)
  • Loading branch information
GeneralUser01 committed Feb 26, 2025
1 parent 7d920e7 commit 3be0c13
Show file tree
Hide file tree
Showing 7 changed files with 1,522 additions and 262 deletions.
1,649 changes: 1,387 additions & 262 deletions src/mumble/Markdown.cpp

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions themes/Default/Dark.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1085,4 +1085,33 @@ TalkingUI > QFrame {
border-radius: 2px;
}

code {
background-color: #0d0620;
}

.codeblock > tr > * {
background-color: #0c0d27;
border: 1px solid #117d90;
border-right-color: #12727c;
border-bottom-color: #0a5861;
padding: 8px;
}

.blockquote > tr > * {
background-color: #1e1e1e;
color: #cbcac9;
border: 3px none #6e6e6e;
border-left-style: solid;
padding: 2px 5px;
}

.table {
border-width: 1px;
border-style: solid;
vertical-align: middle;
}
.table > tr > * {
padding: 2px;
}

/*# sourceMappingURL=Dark.qss.map */
29 changes: 29 additions & 0 deletions themes/Default/Lite.qss
Original file line number Diff line number Diff line change
Expand Up @@ -1085,4 +1085,33 @@ TalkingUI > QFrame {
border-radius: 2px;
}

code {
background-color: #d1ebf5;
}

.codeblock > tr > * {
background-color: #dcebee;
border: 1px solid #c7f1fb;
border-right-color: #b1e6f1;
border-bottom-color: #aae1ed;
padding: 8px;
}

.blockquote > tr > * {
background-color: #e0e0e0;
color: #2a2a2a;
border: 3px none #595a5b;
border-left-style: solid;
padding: 2px 5px;
}

.table {
border-width: 1px;
border-style: solid;
vertical-align: middle;
}
.table > tr > * {
padding: 2px;
}

/*# sourceMappingURL=Lite.qss.map */
30 changes: 30 additions & 0 deletions themes/Default/source/Dark.scss
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,33 @@
@import 'Imports/Base Theme';

// Add or import your own custom QSS below

code {
background-color: $code-background-color;
}

.codeblock > tr > * {
background-color: $codeblock-background-color;
border: 1px solid $codeblock-border-color;
border-right-color: $codeblock-border-right-color;
border-bottom-color: $codeblock-border-bottom-color;
padding: 8px;
}

.blockquote > tr > * {
background-color: $blockquote-background-color;
color: $blockquote-color;
border: 3px none $blockquote-border-color;
border-left-style: solid;
padding: 2px 5px;
}

.table {
border-width: 1px;
border-style: solid;
vertical-align: middle;

& > tr > * {
padding: 2px;
}
}
9 changes: 9 additions & 0 deletions themes/Default/source/Imports/Dark Definitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,12 @@ $font-size-small: 8pt;
$font-size-extra-small: 7pt;
$font-size-qslider-groove: 3pt;
$font-size-qslider-handle: 4pt;

$code-background-color: #0d0620;
$codeblock-background-color: #0c0d27;
$codeblock-border-color: #117d90;
$codeblock-border-right-color: #12727c;
$codeblock-border-bottom-color: #0a5861;
$blockquote-background-color: #1e1e1e;
$blockquote-color: #cbcac9;
$blockquote-border-color: #6e6e6e;
9 changes: 9 additions & 0 deletions themes/Default/source/Imports/Lite Definitions.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,12 @@ $font-size-small: 8pt;
$font-size-extra-small: 7pt;
$font-size-qslider-groove: 3pt;
$font-size-qslider-handle: 4pt;

$code-background-color: #d1ebf5;
$codeblock-background-color: #dcebee;
$codeblock-border-color: #c7f1fb;
$codeblock-border-right-color: #b1e6f1;
$codeblock-border-bottom-color: #aae1ed;
$blockquote-background-color: #e0e0e0;
$blockquote-color: #2a2a2a;
$blockquote-border-color: #595a5b;
29 changes: 29 additions & 0 deletions themes/Default/source/Lite.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,32 @@

// Add or import your own custom QSS below

code {
background-color: $code-background-color;
}

.codeblock > tr > * {
background-color: $codeblock-background-color;
border: 1px solid $codeblock-border-color;
border-right-color: $codeblock-border-right-color;
border-bottom-color: $codeblock-border-bottom-color;
padding: 8px;
}

.blockquote > tr > * {
background-color: $blockquote-background-color;
color: $blockquote-color;
border: 3px none $blockquote-border-color;
border-left-style: solid;
padding: 2px 5px;
}

.table {
border-width: 1px;
border-style: solid;
vertical-align: middle;

& > tr > * {
padding: 2px;
}
}

0 comments on commit 3be0c13

Please sign in to comment.