package b0

  1. Overview
  2. Docs
On This Page
  1. CommonMark
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module B0_adhocSource

Ad-hoc data extraction.

CommonMark

Sourceval commonmark_first_section : preamble:bool -> string -> (string * string) option

first_section src is Some (title, content) where title is the content of the first CommonMark header found in CommonMark source src and content everything that follows until the next header (preamble is true) or next header of the same of smaller level (preamble is false). Trailing blank lines are discarded.

Warning. This function may break on valid CommonMark inputs in all sorts of fashion.