md

Markdown parser implementation.

Members

Aliases

ProcessCodeFn
alias ProcessCodeFn = string delegate(string) @(safe) nothrow
Undocumented in source.
UrlFilterFn
alias UrlFilterFn = string delegate(string urlOrPath, bool isImage)
Undocumented in source.

Classes

MarkdownHandler
class MarkdownHandler
Undocumented in source.
MarkdownSettings
class MarkdownSettings
Undocumented in source.

Enums

HTMLEscapeFlags
enum HTMLEscapeFlags

Flags for HTML-escaping some symbols.

MarkdownFlags
enum MarkdownFlags
Undocumented in source.

Functions

allOf
bool allOf(string str, string chars)

Checks if all characters in 'str' are contained in 'chars'.

anyOf
bool anyOf(string str, string chars)

Checks if any character in 'str' is contained in 'chars'.

asSlug
auto asSlug(R text)

Generates an identifier suitable to use as within a URL.

convertMarkdownToHTML
deprecated string convertMarkdownToHTML(string markdownText, MarkdownSettings settings)
Undocumented in source. Be warned that the author may not have intended to support it.
convertMarkdownToHTML
deprecated string convertMarkdownToHTML(string markdownText, MarkdownFlags flags)
Undocumented in source. Be warned that the author may not have intended to support it.
filterHTMLAllEscape
void filterHTMLAllEscape(R dst, S str)

Writes the HTML escaped version of a given string to an output range (escapes every character).

filterHTMLAttribEscape
void filterHTMLAttribEscape(R dst, S str)

Writes the HTML escaped version of a given string to an output range (also escapes double quotes).

filterHTMLEscape
void filterHTMLEscape(R dst, S str, HTMLEscapeFlags flags)

Writes the HTML escaped version of a given string to an output range.

filterHTMLEscape
void filterHTMLEscape(R dst, dchar ch, HTMLEscapeFlags flags)

Writes the HTML escaped version of a character to an output range.

getMarkdownOutline
Section[] getMarkdownOutline(string markdown_source, MarkdownSettings settings)

Returns the hierarchy of sections.

indexOfCT
ptrdiff_t indexOfCT(Char[] s, dchar c, CaseSensitive cs)
Undocumented in source. Be warned that the author may not have intended to support it.
matchBracket
sizediff_t matchBracket(string str, bool nested)

Finds the closing bracket (works with any of '[', '(', '<', '{').

Structs

Section
struct Section
Undocumented in source.

Meta

License

Subject to the terms of the MIT license. Repository: https://github.com/dlang-community/dmarkdown

This library was forked and modified in 2021-2022 for the hgen project. hgen: https://gitlab.com/os-18/hgen

Authors

Eugene 'Vindex' Stulin <tech.vindex@gmail.com>

MIT License (Expat version)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.