GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): keep markup literal after an over-indented fence in PR r… · pingdotgg/t3code@1d4d1f7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • apps/server/src/orchestration-v2
    • pullRequestWatch.test.ts
    • pullRequestWatch.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎apps/server/src/orchestration-v2/pullRequestWatch.test.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/pullRequestWatch.test.ts
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,8 +1096,8 @@ Review triggered.
10961096
],
10971097
[
10981098
"code spans and fences",
1099-
"Replace `<div>` with ``<span>``:\n~~~html\n<p>Done</p>\n~~~\r\nor\r\n```html\r\n<b>Done</b>\r\n```",
1100-
"Replace `<div>` with ``<span>``: ~~~html <p>Done</p> ~~~ or ```html <b>Done</b> ```",
1099+
"Replace `<div>` with ``<span>``:\n~~~html\n<p>Done</p>\n~~~\r\nor\r\n```html\r\n<b>Done</b>\r\n ```\r\n<div>KEEP</div>\r\n ```\r\n<i>after</i>",
1100+
"Replace `<div>` with ``<span>``: ~~~html <p>Done</p> ~~~ or ```html <b>Done</b> ``` <div>KEEP</div> ``` after",
11011101
],
11021102
[
11031103
"indented code",
Collapse file

‎apps/server/src/orchestration-v2/pullRequestWatch.ts‎

Copy file name to clipboardExpand all lines: apps/server/src/orchestration-v2/pullRequestWatch.ts
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,12 @@ function withoutMarkup(body: string): string {
359359
};
360360
for (const line of body.split("\n")) {
361361
if (fence !== undefined) {
362-
const closer = line.trim();
363-
if (closer.length >= fence.length && closer.replaceAll(fence.charAt(0), "") === "") {
362+
const closer = /^ {0,3}(`{3,}|~{3,})[ \t]*\r?$/.exec(line)?.[1];
363+
if (
364+
closer !== undefined &&
365+
closer.charAt(0) === fence.charAt(0) &&
366+
closer.length >= fence.length
367+
) {
364368
fence = undefined;
365369
}
366370
code(line);

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.