MD::Parser
MD::Parser< Trait > Class Template Referencefinal
#include <parser.h>
Public Member Functions | |
Parser () | |
~Parser ()=default | |
void | addTextPlugin (int id, TextPluginFunc< Trait > plugin, bool processInLinks, const typename Trait::StringList &userData) |
std::shared_ptr< Document< Trait > > | parse (const typename Trait::String &fileName, bool recursive=true, const typename Trait::StringList &ext={Trait::latin1ToString("md"), Trait::latin1ToString("markdown")}, bool fullyOptimizeParagraphs=true) |
std::shared_ptr< Document< Trait > > | parse (typename Trait::TextStream &stream, const typename Trait::String &path, const typename Trait::String &fileName, bool fullyOptimizeParagraphs=true) |
void | removeTextPlugin (int id) |
Detailed Description
template<class Trait>
class MD::Parser< Trait >
class MD::Parser< Trait >
Markdown parser.
Constructor & Destructor Documentation
◆ Parser()
template<class Trait >
|
inline |
◆ ~Parser()
template<class Trait >
|
default |
Member Function Documentation
◆ addTextPlugin()
template<class Trait >
|
inline |
Add text plugin.
- Parameters
-
id ID of a plugin. Use TextPlugin::UserDefinedPluginID value for start ID. plugin Function of a plugin, that will be invoked to processs raw text. processInLinks Should this plugin be used in parsing of internals of links? userData User data that will be passed to plugin function.
◆ parse() [1/2]
template<class Trait >
|
inline |
- Returns
- Parsed Markdown document.
- Parameters
-
fileName File name of the Markdown document. recursive Should parsing be recursive? If recursive all links to existing Markdown files will be parsed and presented in the returned document. ext Allowed extensions for Markdonw document files. If Markdown file doesn't have given extension it will be ignored. fullyOptimizeParagraphs Make full optimization, or just semi one. In full optimization text items with one style but with some closing delimiters in the middle will be concatenated in one, like in **text* text*, here in full optimization will be "text text" with 2 open/close style delimiters, but one closing delimiter is in the middle.
◆ parse() [2/2]
template<class Trait >
|
inline |
- Returns
- Parsed Markdown document.
- Parameters
-
stream Stream to parse. path Absolute path to the root folder for the document. This path will be used to resolve local links. fileName This argument needed only for anchor. fullyOptimizeParagraphs Make full optimization, or just semi one. In full optimization text items with one style but with some closing delimiters in the middle will be concatenated in one, like in **text* text*, here in full optimization will be "text text" with 2 open/close style delimiters, but one closing delimiter is in the middle.
◆ removeTextPlugin()
template<class Trait >
|
inline |
The documentation for this class was generated from the following file:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:36 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.