Markdown rendering drops `<summary>` elements such as in `gh pr view`
- Dominant language
- Go
- Stars
- 46.3k
- Forks
- 9k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 89
Description
### Describe the bug
Whitespace is collapsed in a place where it shouldn't be and `` elements are dropped.
```
gh version 2.4.0 (2021-12-21)
https://github.com/cli/cli/releases/tag/v2.4.0
```
### Steps to reproduce the behavior
1. Type this `gh pr view https://github.com/check-spelling/home-assistant-core/pull/1`
2. View the output:
```
Spelling #1
Merged • jsoref wants to merge 278 commits into spell-check-with-spelling from spelling • +666 -666
## Breaking change
## Proposed change
## Type of change
[ ] Dependency upgrade
[ ] Bugfix (non-breaking change which fixes an issue)
[ ] New integration (thank you!)
[ ] New feature (which adds functionality to an existing integration)
[ ] Breaking change (fix/feature causing existing functionality to break)
[ ] Code quality improvements to existing code or addition of tests
## Additional information
• This PR fixes or closes issue: fixes #
• This PR is related to issue:
• Link to documentation pull request:
## Checklist
[ ] The code change is tested and works locally.
[ ] Local tests pass. Your PR cannot be merged unless tests pass
[ ] There is no commented out code in this PR.
[ ] I have followed the development checklist https://developers.home-
assistant.io/docs/en/development_checklist.html
[ ] The code has been formatted using Black ( black --fast homeassistant tests
)
[ ] Tests have been added to verify that the new code works.
If user exposed functionality or configuration variables are added/changed:
[ ] Documentation added/updated for www.home-assistant.io
https://github.com/home-assistant/home-assistant.io
If the code communicates with devices, web services, or third-party tools:
[ ] The manifest file https://developers.home-
assistant.io/docs/en/creating_integration_manifest.html has all fields
filled out correctly.
Updated and included derived files by running: python3 -m script.hassfest .
[ ] New or updated dependencies have been added to requirements_all.txt .
Updated by running python3 -m script.gen_requirements_all .
[ ] For the updated dependencies - a link to the changelog, or at minimum a
diff between library versions is added to the PR description.
[ ] Untested files have been added to .coveragerc .
The integration reached or maintains the following Integration Quality Scale
https://developers.home-
assistant.io/docs/en/next/integration_quality_scale_index.html:
[ ] No score or internal
[ ] 🥈 Silver
[ ] 🥇 Gold
[ ] 🏆 Platinum
To help with the load of incoming pull requests:
[ ] I have reviewed two other open pull requests https://github.com/home-
assistant/core/pulls?q=is%3Aopen+is%3Apr+-author%3A%40me+-draft%3Atrue+-
label%3Awaiting-for-upstream+sort%3Acreated-desc+review%3Anone+-status%3Afailure
in this repository.
———————— Not showing 2 comments ————————
github-actions • 14d • Edited • Newest comment
@check-spelling-bot Report
### 🔴 Please review
See the files /1/files/ view or the action log https://github.com/check-
spelling/home-assistant-core/actions/runs/1706097669 for details.
#### Unrecognized words (1)
DOF
cspell:cpp/cpp.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/cpp/cpp.txt (104293) covers 380 of them
cspell:html/html.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/html/html.txt (542) covers 123 of them
cspell:css/css.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/css/css.txt (993) covers 115 of them
cspell:aws/aws.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/aws/aws.txt (1485) covers 65 of them
cspell:python/python.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/python/python.txt (364) covers 58 of
them cspell:django/django.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/django/django.txt (2342) covers 49 of
them cspell:filetypes/filetypes.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/filetypes/filetypes.txt (337) covers
44 of them cspell:golang/go.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/golang/go.txt (7745) covers 32 of
them cspell:npm/npm.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/npm/npm.txt (671) covers 31 of them
cspell:java/java.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/java/java.txt (33524) covers 28 of them
cspell:fullstack/fullstack.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/fullstack/fullstack.txt (181) covers
27 of them cspell:scala/scala.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/scala/scala.txt (2752) covers 15 of
them cspell:lua/lua.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/lua/lua.txt (391) covers 15 of them
cspell:rust/rust.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/rust/rust.txt (112) covers 8 of them
cspell:csharp/csharp.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/csharp/csharp.txt (123) covers 7 of
them cspell:ruby/ruby.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/ruby/ruby.txt (354) covers 5 of them
cspell:php/php.txt https://raw.githubusercontent.com/check-spelling/cspell-
dicts/HEAD/dictionaries/php/php.txt (9785) covers 3 of them
cspell:dotnet/dotnet.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/dotnet/dotnet.txt (9824) covers 3 of
them cspell:bash/bash-words.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/bash/bash-words.txt (22) covers 2 of
them cspell:node/node.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/node/node.txt (9611) covers 1 of them
cspell:companies/companies.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/companies/companies.txt (1690) covers
1 of them cspell:ada/ada.txt https://raw.githubusercontent.com/check-
spelling/cspell-dicts/HEAD/dictionaries/ada/ada.txt (72) covers 1 of them
Consider adding them using:
with:
extra_dictionaries:
cspell:cpp/cpp.txt
cspell:html/html.txt
cspell:css/css.txt
cspell:aws/aws.txt
cspell:python/python.txt
cspell:django/django.txt
cspell:filetypes/filetypes.txt
cspell:golang/go.txt
cspell:npm/npm.txt
cspell:java/java.txt
cspell:fullstack/fullstack.txt
cspell:scala/scala.txt
cspell:lua/lua.txt
cspell:rust/rust.txt
cspell:csharp/csharp.txt
cspell:ruby/ruby.txt
cspell:php/php.txt
cspell:dotnet/dotnet.txt
cspell:bash/bash-words.txt
cspell:node/node.txt
cspell:companies/companies.txt
cspell:ada/ada.txt
To stop checking additional dictionaries, add:
with:
check_extra_dictionaries: ''
... in a clone of the git@github.com:check-spelling/home-assistant-core.git
https://github.com/check-spelling/home-assistant-core.git repository on the
spell-check-with-spelling branch:
update_files() {
perl -e '
my @expect_files=qw('".github/actions/spelling/expect.txt"');
@ARGV=@expect_files;
my @stale=qw('"$patch_remove"');
my $re=join "|", @stale;
my $suffix=".".time();
my $previous="";
sub maybe_unlink { unlink($_[0]) if $_[0]; }
while (<>) {
if ($ARGV ne $old_argv) { maybe_unlink($previous);
$previous="$ARGV$suffix"; rename($ARGV, $previous); open(ARGV_OUT,
">$ARGV"); select(ARGV_OUT); $old_argv = $ARGV; }
next if /^(?:$re)(?:(?:\r|\n)*$| .*)/; print;
}; maybe_unlink($previous);'
perl -e '
my $new_expect_file=".github/actions/spelling/expect.txt";
use File::Path qw(make_path);
use File::Basename qw(dirname);
make_path (dirname($new_expect_file));
open FILE, q{<}, $new_expect_file; chomp(my @words = ); close FILE;
my @add=qw('"$patch_add"');
my %items; @items{@words} = @words x (1); @items{@add} = @add x (1);
@words = sort {lc($a)."-".$a cmp lc($b)."-".$b} keys %items;
open FILE, q{>}, $new_expect_file; for my $word (@words) { print FILE
"$word\n" if $word =~ /\w/; };
close FILE;
system("git", "add", $new_expect_file);
'
}
comment_json=$(mktemp)
curl -L -s -S \
-H "Content-Type: application/json" \
"https://api.github.com/repos/check-spelling/home-assistant-
core/issues/comments/1014099505" > "$comment_json"
comment_body=$(mktemp)
jq -r ".body // empty" "$comment_json" > $comment_body
rm $comment_json
patch_remove=$(perl -ne 'next unless s{^(.*)$}{$1};
print' < "$comment_body")
patch_add=$(perl -e '$/=undef; $_=<>; if (m{Unrecognized
words[^<]*\n*```\n*([^<]*)```\n*$}m) { print "$1" }
elsif (m{Unrecognized words[^<]*\n\n((?:\w.*\n)+)\n}m) { print "$1" };' <
"$comment_body")
update_files
rm $comment_body
git add -u
If items relate to a ...
• well-formed pattern.If you can write a pattern https://github.com/check-
spelling/check-spelling/wiki/Configuration-Examples:-patterns that would match
it,
try adding it to the patterns.txt file.Patterns are Perl 5 Regular
Expressions - you can test https://www.regexplanet.com/advanced/perl/ yours
before committing to verify it will match your lines.Note that patterns
can't match multiline strings.
• binary file.Please add a file path to the excludes.txt file matching the
containing file.File paths are Perl 5 Regular Expressions - you can test
https://www.regexplanet.com/advanced/perl/ yours before committing to verify
it will match your files. ^ refers to the file's path from the root of the
repository, so ^README\.md$ would exclude README.md /tree/HEAD/README.md
(on whichever branch you're using).
Use --comments to view the full conversation
View this pull request on GitHub: https://github.com/check-spelling/home-assistant-core/pull/1
```
### Expected vs actual behavior
#### Actual
```
If items relate to a ...
• well-formed pattern.If you can write a pattern
```
Note: the `` tag was lost.
#### Expected
```
If the flagged items do not appear to be text
If items relate to a ...
well-formed pattern.
If you can write a pattern that would match it,
```

### Logs
Contributor guide
Assessment
This issue has not been assessed yet.