Doxygen
Loading...
Searching...
No Matches
markdown.h File Reference

#include <src/markdown.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 3800 of file markdown.cpp.

3801{
3802 AUTO_TRACE("fileName={}",fileName);
3803 DString absFileName = FileInfo(fileName.str()).absFilePath();
3804 DString baseFn = stripFromPath(absFileName);
3805 if (size_t i = baseFn.rfind('.'); i!=DString::npos) baseFn = baseFn.left(i);
3806 DString baseName = escapeCharsInString(baseFn,false,false);
3807 //printf("markdownFileNameToId(%s)=md_%s\n",qPrint(fileName),qPrint(baseName));
3808 DString res = "md_"+baseName;
3809 AUTO_TRACE_EXIT("result={}",res);
3810 return res;
3811}
A String class for use with Doxygen wrapping std::string and adding some additional functionality off...
Definition dstring.h:84
size_t rfind(char c, size_t pos=npos) const
Definition dstring.h:244
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:178
DString left(size_t len) const
Definition dstring.h:306
const std::string & str() const
Definition dstring.h:645
Minimal replacement for QFileInfo.
Definition fileinfo.h:26
std::string absFilePath() const
Definition fileinfo.cpp:105
#define AUTO_TRACE(...)
Definition markdown.cpp:68
#define AUTO_TRACE_EXIT(...)
Definition markdown.cpp:70
DString escapeCharsInString(const DString &name, bool allowDots, bool allowUnderscore)
Definition util.cpp:2688
DString stripFromPath(const DString &path)
Definition util.cpp:219

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().