File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -3526,20 +3526,17 @@ void MarkdownOutlineParser::parseInput(const QCString &fileName,
3526
3526
break ;
3527
3527
case ExplicitPageResult::explicitPage:
3528
3528
{
3529
- // look for `@page label Title\n` and capture `label`
3530
- static const reg::Ex re (R"( [\\@]page\s+(\a[\w-]*)\s*[^\n]*\n)" );
3529
+ // look for `@page label My Title\n` and capture `label` (match[1]) and ` My Title` (match[2])
3530
+ static const reg::Ex re (R"( [\\@]page\s+(\a[\w-]*)( \s*[^\n]*) \n)" );
3531
3531
reg::Match match;
3532
3532
std::string s = docs.str ();
3533
3533
if (reg::search (s,match,re))
3534
3534
{
3535
3535
QCString orgLabel = match[1 ].str ();
3536
3536
QCString newLabel = markdownFileNameToId (fileName);
3537
- size_t labelStartPos = match[1 ].position ();
3538
- size_t labelEndPos = labelStartPos+match[1 ].length (); // i.e. first position after the label
3539
- size_t lineLen = match.length ();
3540
- docs = docs.left (labelStartPos)+ // part before label
3537
+ docs = docs.left (match[1 ].position ())+ // part before label
3541
3538
newLabel+ // new label
3542
- docs. mid (labelEndPos,lineLen-labelEndPos)+ // part between orgLabel and \n
3539
+ match[ 2 ]. str ()+ // part between orgLabel and \n
3543
3540
" \\ ilinebr @anchor " +orgLabel+" \n " + // add original anchor
3544
3541
docs.right (docs.length ()-match.length ()); // add remainder of docs
3545
3542
}
You can’t perform that action at this time.
0 commit comments