mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 05:49:53 +08:00
fix HGMarkdownHighlighter regular expression
Change the default markdown.css. Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
parent
6a3fdf63a2
commit
51d0eedcb2
@ -32,8 +32,8 @@ HGMarkdownHighlighter::HGMarkdownHighlighter(const QVector<HighlightingStyle> &s
|
||||
: QSyntaxHighlighter(parent), parsing(0),
|
||||
waitInterval(waitInterval), content(NULL), capacity(0), result(NULL)
|
||||
{
|
||||
codeBlockStartExp = QRegExp("^```");
|
||||
codeBlockEndExp = QRegExp("^```$");
|
||||
codeBlockStartExp = QRegExp("^(\\s)*```");
|
||||
codeBlockEndExp = QRegExp("^(\\s)*```$");
|
||||
codeBlockFormat.setForeground(QBrush(Qt::darkYellow));
|
||||
for (int index = 0; index < styles.size(); ++index) {
|
||||
if (styles[index].type == pmh_VERBATIM) {
|
||||
|
@ -116,6 +116,37 @@ hr {
|
||||
color: #999;
|
||||
}
|
||||
|
||||
table {
|
||||
padding: 0;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
table tr {
|
||||
border-top: 1px solid #cccccc;
|
||||
background-color: white;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
table tr:nth-child(2n) {
|
||||
background-color: #f8f8f8;
|
||||
}
|
||||
table tr th {
|
||||
font-weight: bold;
|
||||
border: 1px solid #cccccc;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
table tr td {
|
||||
border: 1px solid #cccccc;
|
||||
margin: 0;
|
||||
padding: 6px 13px;
|
||||
}
|
||||
table tr th :first-child, table tr td :first-child {
|
||||
margin-top: 0;
|
||||
}
|
||||
table tr th :last-child, table tr td :last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
/* Code below this line is copyright Twitter Inc. */
|
||||
|
||||
button,
|
||||
|
Loading…
x
Reference in New Issue
Block a user