package patdiff
File Diff using the Patience Diff algorithm
Install
Dune Dependency
Authors
Maintainers
Sources
v0.17.0.tar.gz
sha256=f4f2b060ea39870e238f5be744e84d1d8030864a02f8fc2368866e4d3d7e1b72
doc/src/patdiff.expect_test_patdiff/expect_test_patdiff.ml.html
Source file expect_test_patdiff.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
open! Core open Expect_test_helpers_base open Patdiff_kernel let patdiff ?location_style ?context ?keep_ws ?float_tolerance string1 string2 = Patdiff_core.Without_unix.patdiff (* turns off ANSI codes for color *) ?location_style ?float_tolerance ~output:Ascii (* without color, cannot produce the "!|" lines that mix add/keep/remove *) ~produce_unified_lines:false (* line splitting produces confusing output in ASCII format *) ~split_long_lines:false ?context ?keep_ws ~prev:{ name = "a"; text = string1 } ~next:{ name = "b"; text = string2 } () ;; let patdiff_s ?location_style ?context ?keep_ws ?float_tolerance sexp1 sexp2 = patdiff ?location_style ?context ?keep_ws ?float_tolerance (sexp_to_string sexp1) (sexp_to_string sexp2) ;; let print_endline_if_non_empty = function | "" -> () | string -> print_endline string ;; let print_patdiff ?location_style ?context ?keep_ws ?float_tolerance string1 string2 = print_endline_if_non_empty (patdiff ?location_style ?context ?keep_ws ?float_tolerance string1 string2) ;; let print_patdiff_s ?location_style ?context ?keep_ws ?float_tolerance sexp1 sexp2 = print_endline_if_non_empty (patdiff_s ?location_style ?context ?keep_ws ?float_tolerance sexp1 sexp2) ;; let diff_printer ?location_style ?context ?keep_ws ?float_tolerance initial = let print = let previous = ref None in fun current -> (match !previous with | None -> print_endline current | Some previous -> print_patdiff ?location_style ?context ?keep_ws ?float_tolerance previous current); previous := Some current in let () = Option.iter initial ~f:print in stage print ;; let diff_printer_s ?location_style ?context ?keep_ws ?float_tolerance initial = let diff_printer = unstage (diff_printer ?location_style ?context ?keep_ws ?float_tolerance (Option.map ~f:sexp_to_string initial)) in stage (fun sexp -> diff_printer (sexp_to_string sexp)) ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>