diff options
author | 2022-12-03 15:23:55 +0800 | |
---|---|---|
committer | 2022-12-03 15:23:55 +0800 | |
commit | 56bc7a67da59d93b82669ec70f654b866acee812 (patch) | |
tree | 514f201d9017cd146504241b010cae0df46082c7 /source/features/use-first-commit-message-for-new-prs.tsx | |
parent | 9a0caa6bb3f6617e7f205887ebf8262b46706ef3 (diff) | |
download | refined-github-56bc7a67da59d93b82669ec70f654b866acee812.tar.gz refined-github-56bc7a67da59d93b82669ec70f654b866acee812.tar.zst refined-github-56bc7a67da59d93b82669ec70f654b866acee812.zip |
Update dependencies and lint
#6128
Diffstat (limited to 'source/features/use-first-commit-message-for-new-prs.tsx')
-rw-r--r-- | source/features/use-first-commit-message-for-new-prs.tsx | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/features/use-first-commit-message-for-new-prs.tsx b/source/features/use-first-commit-message-for-new-prs.tsx index 1810a160..90c5d71a 100644 --- a/source/features/use-first-commit-message-for-new-prs.tsx +++ b/source/features/use-first-commit-message-for-new-prs.tsx @@ -9,11 +9,15 @@ import looseParseInt from '../helpers/loose-parse-int'; function interpretNode(node: ChildNode): string | void { switch (node instanceof Element && node.tagName) { case false: - case 'A': + case 'A': { return node.textContent!; - case 'CODE': + } + + case 'CODE': { // Restore backticks that GitHub loses when rendering them return '`' + node.textContent! + '`'; + } + default: // Ignore other nodes, like `<span>...</span>` that appears when commits have a body } |