MCPcopy
hub / github.com/vercel/next.js / nextBreak

Method nextBreak

packages/next/src/compiled/@vercel/og/index.edge.js:3609–3637  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3607 return shouldBreak;
3608 }
3609 nextBreak() {
3610 if (this.curClass == null) {
3611 let firstClass = this.nextCharClass();
3612 this.curClass = $557adaaeb0c7885f$var$mapFirst(firstClass);
3613 this.nextClass = firstClass;
3614 this.LB8a = firstClass === $1627905f8be2ef3f$export$30a74a373318dec6;
3615 this.LB30a = 0;
3616 }
3617 while (this.pos < this.string.length) {
3618 this.lastPos = this.pos;
3619 const lastClass = this.nextClass;
3620 this.nextClass = this.nextCharClass();
3621 if (this.curClass === $1627905f8be2ef3f$export$66498d28055820a9 || this.curClass === $1627905f8be2ef3f$export$de92be486109a1df && this.nextClass !== $1627905f8be2ef3f$export$606cfc2a8896c91f) {
3622 this.curClass = $557adaaeb0c7885f$var$mapFirst($557adaaeb0c7885f$var$mapClass(this.nextClass));
3623 return new $557adaaeb0c7885f$var$Break(this.lastPos, true);
3624 }
3625 let shouldBreak = this.getSimpleBreak();
3626 if (shouldBreak === null)
3627 shouldBreak = this.getPairTableBreak(lastClass);
3628 this.LB8a = this.nextClass === $1627905f8be2ef3f$export$30a74a373318dec6;
3629 if (shouldBreak)
3630 return new $557adaaeb0c7885f$var$Break(this.lastPos);
3631 }
3632 if (this.lastPos < this.string.length) {
3633 this.lastPos = this.string.length;
3634 return new $557adaaeb0c7885f$var$Break(this.string.length);
3635 }
3636 return null;
3637 }
3638 constructor(string) {
3639 this.string = string;
3640 this.pos = 0;

Callers 1

gaFunction · 0.45

Calls 5

nextCharClassMethod · 0.45
getSimpleBreakMethod · 0.45
getPairTableBreakMethod · 0.45

Tested by

no test coverage detected