microfmt
Zero-allocation C++ formatting for constrained environments
Loading...
Searching...
No Matches
Classes | Enumerations | Functions
microfmt::md Namespace Reference

Classes

struct  bold_view
 
struct  code_view
 
struct  column
 
class  details_guard
 
struct  image_view
 
struct  italic_view
 
struct  link_view
 
struct  strike_view
 
class  table_writer
 
class  writer
 

Enumerations

enum class  align : uint8_t { left , center , right }
 
enum class  admonition : uint8_t {
  note , tip , important , warning ,
  caution
}
 

Functions

void write_metadata_table (writer &w, metadata_map map, span< char > scratch_buf, string_view title="Metadata Properties") noexcept
 Streams any type-erased metadata_map view into a Markdown table.
 
template<typename Callable >
writer & details (writer &w, microfmt::string_view summary, Callable &&body, bool open=false) noexcept
 
constexpr bold_view bold (microfmt::string_view s) noexcept
 
constexpr italic_view italic (microfmt::string_view s) noexcept
 
constexpr strike_view strike (microfmt::string_view s) noexcept
 
constexpr code_view code (microfmt::string_view s) noexcept
 
constexpr link_view link (microfmt::string_view label, microfmt::string_view url) noexcept
 
constexpr image_view image (microfmt::string_view alt, microfmt::string_view url) noexcept
 

Enumeration Type Documentation

◆ admonition

enum class microfmt::md::admonition : uint8_t
strong
Enumerator
note 
tip 
important 
warning 
caution 

◆ align

enum class microfmt::md::align : uint8_t
strong
Enumerator
left 
center 
right 

Function Documentation

◆ bold()

constexpr bold_view microfmt::md::bold ( microfmt::string_view  s)
constexprnoexcept

◆ code()

constexpr code_view microfmt::md::code ( microfmt::string_view  s)
constexprnoexcept

◆ details()

template<typename Callable >
writer & microfmt::md::details ( writer &  w,
microfmt::string_view  summary,
Callable &&  body,
bool  open = false 
)
inlinenoexcept

◆ image()

constexpr image_view microfmt::md::image ( microfmt::string_view  alt,
microfmt::string_view  url 
)
constexprnoexcept

◆ italic()

constexpr italic_view microfmt::md::italic ( microfmt::string_view  s)
constexprnoexcept

◆ link()

constexpr link_view microfmt::md::link ( microfmt::string_view  label,
microfmt::string_view  url 
)
constexprnoexcept

◆ strike()

constexpr strike_view microfmt::md::strike ( microfmt::string_view  s)
constexprnoexcept

◆ write_metadata_table()

void microfmt::md::write_metadata_table ( writer &  w,
metadata_map  map,
span< char >  scratch_buf,
string_view  title = "Metadata Properties" 
)
inlinenoexcept

Streams any type-erased metadata_map view into a Markdown table.

Parameters
wMarkdown writer instance.
mapType-erased metadata_map view.
scratch_bufCaller-provided character span used as scratch memory for formatting values.
titleOptional table header title.