376
377
if (input.lineDecorations.length > 0) {
379
>
sb.appendString(`<span>`);
380
>
381
>
let beforeCount = 0;
382
>
let afterCount = 0;
383
>
let containsForeignElements = ForeignElementType.None;
384
>
for (const lineDecoration of input.lineDecorations) {
385
>
if (lineDecoration.type === InlineDecorationType.Before || lineDecoration.type === InlineDecorationType.After) {
386
>
sb.appendString(`<span class="`);
387
>
sb.appendString(lineDecoration.className);
388
>
sb.appendString(`"></span>`);
389
>
390
>
if (lineDecoration.type === InlineDecorationType.Before) {
391
>
containsForeignElements |= ForeignElementType.Before;
392
>
beforeCount++;
393
>
}
394
>
if (lineDecoration.type === InlineDecorationType.After) {
395
containsForeignElements |= ForeignElementType.After;
396
afterCount++;
397
}
399
>
}
400
>
401
>
sb.appendString(`</span>`);
402
>
403
>
const characterMapping = new CharacterMapping(1, beforeCount + afterCount);
404
>
characterMapping.setColumnInfo(1, beforeCount, 0, 0);
405
>
406
>
return new RenderLineOutput(
407
>
characterMapping,
408
>
containsForeignElements
409
>
);
410
>
}
411
412
// completely empty line