MD::EmphasisPlugin Namespace
namespace MD::EmphasisPluginNamespace for emphasises plugin template. More...
Header: | #include <md4qt/plugins.h> |
CMake: | find_package(md4qt REQUIRED COMPONENTS md4qt) target_link_libraries(mytarget PRIVATE md4qt::md4qt) |
Functions
void | emphasisTemplatePlugin(std::shared_ptr<MD::Paragraph<Trait>> p, MD::TextParsingOpts<Trait> &po, const typename Trait::StringList &opts) |
Detailed Description
Namespace for emphasises plugin template.
Function Documentation
template <typename Trait> void EmphasisPlugin::emphasisTemplatePlugin(std::shared_ptr<MD::Paragraph<Trait>> p, MD::TextParsingOpts<Trait> &po, const typename Trait::StringList &opts)
Template plugin for emphasises. Emphasises defined with this plugin template behave like "*" and "_" in Markdown. First string in opts is used to set a character that will be used for new emphasis, note that only first character from first string in opts is considered. Also keep in mind rules for left and right flanking for emphasises, to work properly character for delimiter should meet the criteria defined in CommonMark Spec.
p Paragraph.
po Text parsing options.
opts Options for plugin. A first string is a delimiter, note that only first character will be used. A second string is a style number, it should be power of 2, starting at MD::TextOption::StrikethroughText * 2.
See also MD::Parser::addTextPlugin, MD::Parser::removeTextPlugin, and MD::TextPlugin.