March Docs

Cells

cells.march — Cell types, parsing, introspection, and string helpers.

Defines the Cell ADT used throughout the notebook engine and provides:

  • parse_cells/1 : parse .scrollmd source into a List(Cell)
  • cell_tag/1 : return the cell kind as a string
  • cell_source/1 : extract the raw source string from any cell
  • nth_cell/2 : look up a cell by index
  • html_escape/1 : escape HTML special characters
  • json_escape/1 : escape a string for embedding in JSON
  • json_str/1 : wrap an escaped string in JSON double-quotes

Types

typeCellCell = Markdown(String) | Code(String) | Section(String)#

Functions

fncell_sourcecell_source(cell)#
fncell_tagcell_tag(cell)#
fnhtml_escapehtml_escape(s)#
fnjson_escapejson_escape(s)#
fnjson_strjson_str(s) do "\"" ++ json_escape(s) ++ "\"" end#
fnnormalize_crlfnormalize_crlf(s)#
fnnth_cellnth_cell(cells, idx)#
fnparse_cellsparse_cells(content)#