Skip to content

Commit

Permalink
renamed hv2hCrit to wrapAfter
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Mar 29, 2024
1 parent b4f4ba8 commit d3cbccd
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/org/rascalmpl/library/lang/box/util/Box2Text.rsc
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand All @@ -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()
);

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -542,8 +542,4 @@ Text text2latex(Text t) = [text2latex(s)| s <- t];
Text text2html(Text t) = ["\<NOBR\><text2html(s)>\</NOBR\>\<BR\>" | s <- t];
Text text2txt(Text t) = [text2txt(s) | s <- t];
Text text2txt(Text t) = [text2txt(s) | s <- t];

0 comments on commit d3cbccd

Please sign in to comment.