package slipshow

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

Source file folders.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
open Cmarkit

exception Has_math

let has_math =
  let block _ _ = function
    | Block.Ext_math_block _ -> raise Has_math
    | _ -> Folder.default
  in
  let inline _ _ = function
    | Inline.Ext_math_span _ -> raise Has_math
    | _ -> Folder.default
  in
  Ast.Folder.make ~block ~inline ()

let has_math doc =
  try Cmarkit.Folder.fold_doc has_math false doc with Has_math -> true
OCaml

Innovation. Community. Security.