1
0
镜像自地址 https://github.com/quitesimpleorg/qsmaddy.git 已同步 2025-10-10 01:46:30 +02:00

orderedlistparser: Add parsing support for fully numeric markdown lists

这个提交包含在:
Drew Mettlach
2020-10-03 17:22:21 -05:00
父节点 19338d2b56
当前提交 cde0137e90
共有 4 个文件被更改,包括 47 次插入4 次删除

查看文件

@@ -89,9 +89,9 @@ protected:
bool isStartOfNewListItem = this->isStartOfNewListItem(line);
uint32_t indentation = getIndentationWidth(line);
static std::regex orderedlineRegex("^1\\. ");
static std::regex orderedlineRegex("^[1-9]+[0-9]*\\. ");
line = std::regex_replace(line, orderedlineRegex, "");
static std::regex unorderedlineRegex("^(\\* )");
static std::regex unorderedlineRegex("^\\* ");
line = std::regex_replace(line, unorderedlineRegex, "");
if (!this->isStarted)
@@ -132,7 +132,7 @@ private:
bool
isStartOfNewListItem(const std::string& line) const
{
static std::regex re("^(?:1\\. |\\* ).*");
static std::regex re("^(?:[1-9]+[0-9]*\\. |\\* ).*");
return std::regex_match(line, re);
}
}; // class OrderedListParser