Skip to content

Formatting of JS code breaks down after multiple newlines #98

@fatso83

Description

@fatso83

A picture speaks more than a thousand words.

This:
Image

is the rendering of this code (from here):

it("should move in chunks of 100 steps per frame", async () => {
    clock = fakeTimers.install();
    const player = new Player();

    const movePromise = movePlayer(player, 300);

    assert.equal(player.x, 0);
    await clock.tickAsync(3*16);
    assert.equal(player.x, 300);

    return Promise.all([clock.runAllAsync(), movePromise])
});

Github renders this fine, but the 11ty plugin screws up the formatting between the lines and in front of them after a couple of lines.

I tried upgrading (from a really old version to the newest of all), to no avail. I guess this is what the "robustness" bits of #32 is about?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions