Skip to content

Commit

Permalink
Get rid of sexplib.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sylvain Le Gall committed Oct 27, 2013
1 parent 3bfb678 commit 59d560f
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 56 deletions.
40 changes: 0 additions & 40 deletions INSTALL.txt

This file was deleted.

2 changes: 1 addition & 1 deletion _oasis
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ BuildTools: ocamlbuild
Library markdown
Path: src
Modules: Markdown
BuildDepends: extlib, str, sexplib
BuildDepends: extlib, str

Library html
FindlibParent: markdown
Expand Down
4 changes: 0 additions & 4 deletions _tags

This file was deleted.

8 changes: 1 addition & 7 deletions src/Markdown.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
open Printf
open ExtString
open ExtList
open Sexplib.Conv

TYPE_CONV_PATH "Simple_markup"

type ref = { src : string; desc : string }

Expand Down Expand Up @@ -32,13 +29,10 @@ and href = { href_target : string; href_desc : string; }

and img_ref = { img_src : string; img_alt : string; }

and par_list = paragraph list with sexp
and par_list = paragraph list

type parse_state = { max : int; current : Buffer.t; fragments : text list; }

let string_of_paragraph p = Sexplib.Sexp.to_string_hum (sexp_of_paragraph p)
let string_of_paragraphs ps = Sexplib.Sexp.to_string_hum (sexp_of_par_list ps)

let indentation ?(ts=8) s =
let rec loop n indent max =
if n >= max then indent
Expand Down
5 changes: 1 addition & 4 deletions test/TestMarkdown.ml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@ open Markdown
open Printf
open ExtString

let wrap f x =
"\n" ^ f x ^ "\n"

let aeq_pars ?msg expected actual =
assert_equal ?msg ~printer:(wrap string_of_paragraphs) expected actual
assert_equal ?msg expected actual

let check expected input =
aeq_pars ~msg:(sprintf "With input:\n%s\n" (String.strip input))
Expand Down

0 comments on commit 59d560f

Please sign in to comment.