fix HGMarkdownHighlighter regular expression

Change the default markdown.css.

Signed-off-by: Le Tan <tamlokveer@gmail.com>
This commit is contained in:
Le Tan 2016-10-25 10:21:31 +08:00
parent 6a3fdf63a2
commit 51d0eedcb2
2 changed files with 33 additions and 2 deletions

View File

@ -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) {

View File

@ -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,