-
-
Notifications
You must be signed in to change notification settings - Fork 197
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix bug with text wrapping past max width
- Loading branch information
Showing
8 changed files
with
118 additions
and
98 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
opam-version: "2.0" | ||
maintainer: "[email protected]" | ||
authors: ["Jérémie Dimino <[email protected]>"] | ||
authors: ["Jérémie Dimino <[email protected]>" "Anton Bachin" ] | ||
homepage: "https://github.com/mirage/mmap" | ||
bug-reports: "https://github.com/mirage/mmap/issues" | ||
doc: "https://mirage.github.io/mmap/" | ||
|
@@ -19,6 +19,6 @@ This project provides a Mmap.map_file functions for mapping files in memory. | |
""" | ||
url { | ||
src: | ||
"https://github.com/mirage/mmap/releases/download/v1.0.2/mmap-v1.0.2.tbz" | ||
checksum: "md5=7880d4d74b37664f9bb0906ae1cadf6b" | ||
"https://github.com/mirage/mmap/releases/download/v1.1.0/mmap-v1.1.0.tbz" | ||
checksum: "md5=8c5d5fbc537296dc525867535fb878ba" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
opam-version: "2.0" | ||
|
||
maintainer: "[email protected]" | ||
authors: [ | ||
"Jerome Vouillon" | ||
|
@@ -11,27 +12,31 @@ license: "LGPL-2.0 with OCaml linking exception" | |
homepage: "https://github.com/ocaml/ocaml-re" | ||
bug-reports: "https://github.com/ocaml/ocaml-re/issues" | ||
dev-repo: "git+https://github.com/ocaml/ocaml-re.git" | ||
|
||
build: [ | ||
["jbuilder" "subst" "-n" name] {pinned} | ||
["jbuilder" "build" "-p" name "-j" jobs] | ||
["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} | ||
["dune" "subst"] {pinned} | ||
["dune" "build" "-p" name "-j" jobs] | ||
["dune" "runtest" "-p" name "-j" jobs] {with-test} | ||
] | ||
|
||
depends: [ | ||
"ocaml" {>= "4.02.3"} | ||
"jbuilder" {build & >= "1.0+beta10"} | ||
"ocaml" {>= "4.02"} | ||
"dune" {build} | ||
"ounit" {with-test} | ||
"seq" | ||
] | ||
|
||
synopsis: "RE is a regular expression library for OCaml" | ||
description: """ | ||
Pure OCaml regular expressions with: | ||
* Perl-style regular expressions (module Re.Perl) | ||
* Posix extended regular expressions (module Re.Posix) | ||
* Emacs-style regular expressions (module Re.Emacs) | ||
* Shell-style file globbing (module Re.Glob) | ||
* Compatibility layer for OCaml's built-in Str module (module Re.Str)""" | ||
* Compatibility layer for OCaml's built-in Str module (module Re.Str) | ||
""" | ||
url { | ||
src: | ||
"https://github.com/ocaml/ocaml-re/releases/download/1.8.0/re-1.8.0.tbz" | ||
checksum: "md5=765f6f8d3e6ab200866e719ed7e5178d" | ||
"https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz" | ||
checksum: "md5=bddaed4f386a22cace7850c9c7dac296" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
open Rejest; | ||
|
||
open Revery_Core; | ||
|
||
test("TextWrapping", () => | ||
test("doesn't crash when supplied with text that is too wide", () => { | ||
let measureWidth = _ => 14; | ||
let wrapHere = TextWrapping.isWhitespaceWrapPoint; | ||
let text = "W"; | ||
let maxWidth = 12; | ||
let (text, width) = | ||
TextWrapping.wrapText(~text, ~measureWidth, ~maxWidth, ~wrapHere); | ||
expect(text).toEqual(["W"]); | ||
expect(width).toEqual(14); | ||
}) | ||
); |