mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
bug-fix: spaces after # are needed for titles in edit mode
This commit is contained in:
parent
586f5c0994
commit
d44549a43f
@ -306,7 +306,7 @@ void VMdEdit::generateEditOutline()
|
||||
|
||||
// Assume that each block contains only one line
|
||||
// Only support # syntax for now
|
||||
QRegExp headerReg("(#{1,6})\\s*(\\S.*)"); // Need to trim the spaces
|
||||
QRegExp headerReg("(#{1,6})\\s+(\\S.*)"); // Need to trim the spaces
|
||||
int baseLevel = -1;
|
||||
for (QTextBlock block = doc->begin(); block != doc->end(); block = block.next()) {
|
||||
V_ASSERT(block.lineCount() == 1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user