Doxygen
Loading...
Searching...
No Matches
markdown.h File Reference
#include <memory>
#include "qcstring.h"
#include "parserintf.h"
+ Include dependency graph for markdown.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  Markdown
 Helper class to process markdown formatted text. More...
 
class  MarkdownOutlineParser
 

Functions

QCString markdownFileNameToId (const QCString &fileName)
 processes string s and converts markdown into doxygen/html commands.
 

Function Documentation

◆ markdownFileNameToId()

QCString markdownFileNameToId ( const QCString & fileName)

processes string s and converts markdown into doxygen/html commands.

Definition at line 3558 of file markdown.cpp.

3559{
3560 AUTO_TRACE("fileName={}",fileName);
3561 std::string absFileName = FileInfo(fileName.str()).absFilePath();
3562 QCString baseFn = stripFromPath(absFileName.c_str());
3563 int i = baseFn.findRev('.');
3564 if (i!=-1) baseFn = baseFn.left(i);
3565 QCString baseName = escapeCharsInString(baseFn,false,false);
3566 //printf("markdownFileNameToId(%s)=md_%s\n",qPrint(fileName),qPrint(baseName));
3567 QCString res = "md_"+baseName;
3568 AUTO_TRACE_EXIT("result={}",res);
3569 return res;
3570}
Minimal replacement for QFileInfo.
Definition fileinfo.h:23
std::string absFilePath() const
Definition fileinfo.cpp:101
This is an alternative implementation of QCString.
Definition qcstring.h:101
const std::string & str() const
Definition qcstring.h:526
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
QCString left(size_t len) const
Definition qcstring.h:214
#define AUTO_TRACE(...)
Definition markdown.cpp:61
#define AUTO_TRACE_EXIT(...)
Definition markdown.cpp:63
QCString escapeCharsInString(const QCString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:3684
static QCString stripFromPath(const QCString &p, const StringVector &l)
Definition util.cpp:309

References AUTO_TRACE, AUTO_TRACE_EXIT, escapeCharsInString(), QCString::findRev(), QCString::left(), QCString::str(), and stripFromPath().

Referenced by DocRef::DocRef(), DocSecRefItem::parse(), and MarkdownOutlineParser::parseInput().