Skip to content

Commit

Permalink
Remove trailing whitespace in fences
Browse files Browse the repository at this point in the history
  • Loading branch information
lionel- committed Apr 2, 2024
1 parent 16fe7eb commit 7f5e40e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
3 changes: 1 addition & 2 deletions extensions/positron-r/src/test/indentation.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ suite('Indentation', () => {

// Notify if snapshots were outdated
assert.strictEqual(expected, current);
console.log('dirname: ', __dirname);
});
});

Expand All @@ -58,5 +57,5 @@ async function regenerateIndentSnapshots() {
});
}

return snapshots.join('# --- \n');
return snapshots.join('# ---\n');
}
28 changes: 14 additions & 14 deletions extensions/positron-r/src/test/snapshots/indentation-snapshots.R
Original file line number Diff line number Diff line change
@@ -1,51 +1,51 @@
# File generated from `indentation-cases.R`.

# ---
# ---
1 +
"<>"

# ---
# ---
1 +
2 +
"<>"

# ---
# ---
data |>
"<>"

# ---
# ---
data |>
fn()
"<>"

# ---
# ---
# https://github.com/posit-dev/positron/issues/1727
# FIXME
data |>
fn()

"<>"

# ---
# ---
# https://github.com/posit-dev/positron/issues/1316
data |>
fn() |>
"<>"

# ---
# ---
# With trailing whitespace
# https://github.com/posit-dev/positron/pull/1655#issuecomment-1780093395
data |>
fn() |>
"<>"

# ---
# ---
data |>
fn1() |>
fn2() |>
"<>"

# ---
# ---
# FIXME
data |>
fn1() |>
Expand All @@ -54,21 +54,21 @@ data |>
)
"<>"

# ---
# ---
# https://github.com/posit-dev/positron-beta/discussions/46
# FIXME
data |>
fn(
"<>")

# ---
# ---
# FIXME
{
fn(function() {}
"<>")
}

# ---
# ---
# FIXME
{
fn(function() {
Expand All @@ -77,11 +77,11 @@ data |>
"<>")
}

# ---
# ---
for (i in NA) NULL
"<>"

# ---
# ---
# https://github.com/posit-dev/positron/issues/1880
# FIXME
for (i in 1) fn()
Expand Down

0 comments on commit 7f5e40e

Please sign in to comment.