Skip to content

Fix ab-size for embedded code in Issues - #10039

Closed
britsync07-prog wants to merge 1 commit into
refined-github:mainfrom
britsync07-prog:fix/tab-size-in-issues
Closed

britsync07-prog wants to merge 1 commit into
refined-github:mainfrom
britsync07-prog:fix/tab-size-in-issues

Conversation

@britsync07-prog

Copy link
Copy Markdown

Fixes #10031

Description

GitHub's React issue view wraps comments and descriptions in [data-testid='markdown-body'] and .markdown-body rather than .comment-body (which is used in PRs). As a result, embedded code blocks with .tab-size[data-tab-size='8'] in issues missed the custom --tab-size override and reverted to GitHub's default 8-character tab stop.

This PR expands the selector to include [data-testid='markdown-body'] and .markdown-body, ensuring 4-character tab size applies uniformly across issues, PRs, and discussions.

Test URLs

Fixes refined-github#10031

GitHub's React issue view wraps comments in \[data-testid='markdown-body']\ and \.markdown-body\ rather than \.comment-body\, causing embedded code blocks to miss the custom tab-size override. Expand the selector to include these markdown containers.
@github-actions github-actions Bot added the bug label Sep 4, 2026

:root,
.comment-body .tab-size[data-tab-size='8'] {
:is(.comment-body, [data-testid='markdown-body'], .markdown-body) .tab-size[data-tab-size='8'] {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don’t think we need 3 selectors here since we're only adding support for one new view. Is .markdown-body enough for all?

@fregante fregante closed this Sep 7, 2026
@britsync07-prog

Copy link
Copy Markdown
Author

@fregante You're right! Replaced with just .markdown-body .tab-size[data-tab-size='8'], which covers comments and code embeds across PRs, React issues, and discussions cleanly with a single selector. Ran npm run format and all tests pass.

britsync07-prog pushed a commit to britsync07-prog/refined-github that referenced this pull request Sep 8, 2026
Closes refined-github#10031

Replaces \.comment-body\ with \.markdown-body\ to cover code embeds in both PRs and Issues per maintainer review in refined-github#10039.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

tab-size broken for code embedded in Issues

3 participants