Skip to content

Commit

Permalink
Amend style
Browse files Browse the repository at this point in the history
  • Loading branch information
MartyO256 committed May 27, 2022
1 parent 8a84088 commit d96a9a6
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
3 changes: 2 additions & 1 deletion src/core/html.ml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ let generatePage orig =
let orig = Filename.basename orig in
(* Merge different code blocks into, as long as there isn't anything inbetween *)
let fixCodeRegex = Str.regexp "</code></pre>\\(\\([\r\n\t]\\|<br>\\)*?\\)<pre><code>" in
let page = Str.global_replace fixCodeRegex "\\1" (Buffer.contents page) in
let page = Buffer.contents page in
let page = Str.global_replace fixCodeRegex "\\1" page in
let page = Str.global_replace (Str.regexp_string "|-") "&#8866;" page in
let page = Str.global_replace (Str.regexp_string "..") "&hellip;" page in
let page = Str.global_replace (Str.regexp_string "->") "&#x2192" page in
Expand Down
2 changes: 1 addition & 1 deletion src/core/interactive.ml
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ let whale_str =

let whale =
let open Format in
let emit = fprintf str_formatter "%s" in
let emit = pp_print_string str_formatter in
let pass c = emit (String.make 1 c) in
let full_block = "\xe2\x96\x88" in
let light_shade = "\xe2\x96\x91" in
Expand Down
17 changes: 7 additions & 10 deletions src/core/prettyext.ml
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ module Make (_ : Store.Cid.RENDERER) : Printer.Ext.T = struct
match start with
| LF.EmptySub _ -> pp_empty ppf ()
| LF.Id _ ->
fprintf ppf "%s" (symbol_to_html Dots);
pp_print_string ppf (symbol_to_html Dots);
true
| LF.SVar (_, s, sub') ->
print_svar s sub';
Expand All @@ -299,10 +299,10 @@ module Make (_ : Store.Cid.RENDERER) : Printer.Ext.T = struct
then Fmt.comma ppf ();
pp_print_list ~pp_sep: Fmt.comma
print_tm ppf tms;
print_tm ppf tms
in
fprintf ppf "@[<h>%a@]" go ();
fprintf ppf "@[<h>%a@]" go ()
and fmt_ppr_lf_typ_rec ppf typrec =
let ppr_element ppf suffix (x, tA) =
Expand Down Expand Up @@ -406,17 +406,15 @@ module Make (_ : Store.Cid.RENDERER) : Printer.Ext.T = struct
(Id.render_name x)
(fmt_ppr_lf_typ lvl) tA
| LF.TypDeclOpt x ->
fprintf ppf "%s" (Id.render_name x)
pp_print_string ppf (Id.render_name x)
and fmt_ppr_lf_dctx lvl ppf =
function
| LF.CtxHole -> fprintf ppf "_"
| LF.Null ->
fprintf ppf ""
| LF.Null -> ()
| LF.CtxVar (_, x) ->
fprintf ppf "%s"
(Id.render_name x)
pp_print_string ppf (Id.render_name x)
| LF.DDec (LF.Null, d) ->
fmt_ppr_lf_typ_decl lvl ppf d
Expand Down Expand Up @@ -536,8 +534,7 @@ module Make (_ : Store.Cid.RENDERER) : Printer.Ext.T = struct
let rec fmt_ppr_meta_spine lvl ppf =
function
| Comp.MetaNil ->
fprintf ppf ""
| Comp.MetaNil -> ()
| Comp.MetaApp (mO, mS) ->
fprintf ppf " %a%a"
(fmt_ppr_cmp_meta_obj (lvl + 1)) mO
Expand Down

0 comments on commit d96a9a6

Please sign in to comment.