Doxygen
Loading...
Searching...
No Matches
markdown.h File Reference
#include <memory>
#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

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

Function Documentation

◆ markdownFileNameToId()

DString markdownFileNameToId ( const DString & fileName)

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

Definition at line 3799 of file markdown.cpp.

3800{
3801 AUTO_TRACE("fileName={}",fileName);
3802 DString absFileName = FileInfo(fileName.str()).absFilePath();
3803 DString baseFn = stripFromPath(absFileName);
3804 if (size_t i = baseFn.rfind('.'); i!=DString::npos) baseFn = baseFn.left(i);
3805 DString baseName = escapeCharsInString(baseFn,false,false);
3806 //printf("markdownFileNameToId(%s)=md_%s\n",qPrint(fileName),qPrint(baseName));
3807 DString res = "md_"+baseName;
3808 AUTO_TRACE_EXIT("result={}",res);
3809 return res;
3810}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:88
size_t rfind(char c, size_t pos=npos) const
Definition dstring.h:248
static constexpr size_t npos
value used to indicate 'not found' or 'to the end of the string', matching std::string::npos
Definition dstring.h:182
DString left(size_t len) const
Definition dstring.h:310
const std::string & str() const
Definition dstring.h:649
Minimal replacement for QFileInfo.
Definition fileinfo.h:26
std::string absFilePath() const
Definition fileinfo.cpp:101
#define AUTO_TRACE(...)
Definition markdown.cpp:67
#define AUTO_TRACE_EXIT(...)
Definition markdown.cpp:69
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2690
DString stripFromPath(const DString &path)
Definition util.cpp:221

References FileInfo::absFilePath(), AUTO_TRACE, AUTO_TRACE_EXIT, escapeCharsInString(), DString::left(), DString::npos, DString::rfind(), DString::str(), and stripFromPath().

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