@@ -56,6 +56,7 @@ typedef yyguts_t *yyscan_t;
5656#include " entry.h"
5757#include " formula.h"
5858#include " language.h"
59+ #include " mermaid.h"
5960#include " message.h"
6061#include " parserintf.h"
6162#include " reflist.h"
@@ -112,6 +113,7 @@ static bool handleAnchor(yyscan_t yyscanner,const QCString &, const StringVector
112113static bool handleImage (yyscan_t yyscanner,const QCString &, const StringVector &);
113114static bool handleCite (yyscan_t yyscanner,const QCString &, const StringVector &);
114115static bool handleFormatBlock (yyscan_t yyscanner,const QCString &, const StringVector &);
116+ static bool handleMermaidFile (yyscan_t yyscanner,const QCString &s,const StringVector &);
115117static bool handleAddIndex (yyscan_t yyscanner,const QCString &, const StringVector &);
116118static bool handleIf (yyscan_t yyscanner,const QCString &, const StringVector &);
117119static bool handleIfNot (yyscan_t yyscanner,const QCString &, const StringVector &);
@@ -327,7 +329,7 @@ static const std::unordered_map< std::string, DocCmdMap > docCmdMap =
327329 { " msc" , { &handleFormatBlock, CommandSpacing::Block, SectionHandling::Break }},
328330 { " mscfile" , { nullptr , CommandSpacing::Block, SectionHandling::Break }},
329331 { " mermaid" , { &handleFormatBlock, CommandSpacing::Block, SectionHandling::Break }},
330- { " mermaidfile" , { nullptr , CommandSpacing::Block, SectionHandling::Break }},
332+ { " mermaidfile" , { &handleMermaidFile, CommandSpacing::Block, SectionHandling::Break }},
331333 { " name" , { &handleName, CommandSpacing::Invisible, SectionHandling::Escape }},
332334 { " namespace" , { &handleNamespace, CommandSpacing::Invisible, SectionHandling::Escape }},
333335 { " noop" , { &handleNoop, CommandSpacing::Invisible, SectionHandling::Replace }},
@@ -3608,6 +3610,10 @@ static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const String
36083610 addOutput (yyscanner,yyextra->spaceBeforeCmd );
36093611 yyextra->spaceBeforeCmd .clear ();
36103612 }
3613+ if (s==" mermaid" )
3614+ {
3615+ MermaidManager::instance ().setHasInlineDiagrams ();
3616+ }
36113617 if (optList.empty ())
36123618 {
36133619 addOutput (yyscanner," @" +s+" " );
@@ -3623,6 +3629,14 @@ static bool handleFormatBlock(yyscan_t yyscanner,const QCString &s, const String
36233629 return FALSE ;
36243630}
36253631
3632+ static bool handleMermaidFile (yyscan_t yyscanner,const QCString &s,const StringVector &)
3633+ {
3634+ struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
3635+ MermaidManager::instance ().setHasInlineDiagrams ();
3636+ addOutput (yyscanner,yytext);
3637+ return false ;
3638+ }
3639+
36263640static bool handleAddIndex (yyscan_t yyscanner,const QCString &, const StringVector &)
36273641{
36283642 struct yyguts_t *yyg = (struct yyguts_t *)yyscanner;
0 commit comments