From d3cbccdeb788440061805e34353893f27546c147 Mon Sep 17 00:00:00 2001 From: "Jurgen J. Vinju" Date: Fri, 29 Mar 2024 12:04:29 +0100 Subject: [PATCH] renamed hv2hCrit to wrapAfter --- src/org/rascalmpl/library/lang/box/util/Box2Text.rsc | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/org/rascalmpl/library/lang/box/util/Box2Text.rsc b/src/org/rascalmpl/library/lang/box/util/Box2Text.rsc index 4c964ae80dd..bff01fe15b2 100644 --- a/src/org/rascalmpl/library/lang/box/util/Box2Text.rsc +++ b/src/org/rascalmpl/library/lang/box/util/Box2Text.rsc @@ -76,7 +76,7 @@ import lang::box::util::Box; * `vs` is the default separation between vertical elements in V, HV and HOV boxes * `is` is the default (additional) indentation for indented boxes * `maxWidth` is the number of columns (characters) of a single line on screen or on paper -* `hv2hCrit` is the threshold criterium for line fullness, to go to the next line in a HV box and to switching +* `wrapAfter` is the threshold criterium for line fullness, to go to the next line in a HV box and to switching between horizontal and vertical for HOV boxes. } @benefits{ @@ -91,7 +91,7 @@ data Options = options( int vs = 0, int is = 2, int maxWidth=80, - int hv2hCrit=70, + int wrapAfter=70, MarkupLanguage markup=ansi() ); @@ -443,7 +443,7 @@ Text AA(list[Box] bl, Box c, list[Alignment] columns, Options opts, int m) { @synopsis{Check soft limit for HV and HOV boxes} // TODO this seems to ignore SPACE boxes? bool noWidthOverflow(list[Box] hv, Options opts) - = (0 | it + size(s) | /L(s) := hv) < opts.hv2hCrit; + = (0 | it + size(s) | /L(s) := hv) < opts.wrapAfter; @synopsis{Changes all HV boxes that do fit horizontally into hard H boxes.} Box applyHVconstraints(Box b, Options opts) = innermost visit(b) { @@ -542,8 +542,4 @@ Text text2latex(Text t) = [text2latex(s)| s <- t]; Text text2html(Text t) = ["\\\" | s <- t]; -Text text2txt(Text t) = [text2txt(s) | s <- t]; - - - - +Text text2txt(Text t) = [text2txt(s) | s <- t]; \ No newline at end of file