MD::Anchor Class

template <typename Trait> class MD::Anchor

Just an anchor. More...

Header: #include <md4qt/doc.h>
CMake: find_package(md4qt REQUIRED COMPONENTS md4qt)
target_link_libraries(mytarget PRIVATE md4qt::md4qt)
Inherits: MD::Item

Public Functions

std::shared_ptr<MD::Item<Trait>> clone(MD::Document<Trait> *doc = nullptr) const override
const typename Trait::String &label() const
MD::ItemType type() const override

Detailed Description

This library supports recursive Markdown parsing - parsed Markdown file may has links to other Markdown files, that may be parsed recursively with the root file. So in the resulting document can be represented more than one Markdown file. Each file in the document starts with MD::Anchor, it just shows that during traversing through the document you reached new file.

Member Function Documentation

std::shared_ptr<MD::Item<Trait>> Anchor::clone(MD::Document<Trait> *doc = nullptr) const

Clone this anchor.

doc Parent of new item.

const typename Trait::String &Anchor::label() const

Returns label of this anchor.

MD::ItemType Anchor::type() const

Returns item type.