Skip to content

docs: fix extra blank line causing incorrect code highlighting - #55086

Closed
time1043 wants to merge 1 commit into
electron:mainfrom
time1043:patch-1
Closed

time1043 wants to merge 1 commit into
electron:mainfrom
time1043:patch-1

Conversation

@time1043

@time1043 time1043 commented Oct 17, 2026 •

Copy link
Copy Markdown

Description of Change

In this tutorial, highlighting indicates the new line of code being added.

Currently, app.whenReady().then(() => { is highlighted, but ipcMain.handle('ping', () => 'pong') should be highlighted instead. This occurs in two places in the document as shown in the images below.

The cause is an extra blank line at the start of the code blocks (line 2), which shifts the line numbering and makes the highlighting target the wrong line.

2026-10-18_00-52-00 image

Checklist

Release Notes

Notes: none

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ This PR contains unsigned commits. This repository enforces commit signatures
for all incoming PRs. To get your PR merged, please sign those commits
(git rebase --exec 'git commit -S --amend --no-edit -n' @{upstream}) and force push them to this branch
(git push --force-with-lease)

For more information on signing commits, see GitHub's documentation on Telling Git about your signing key.

@github-actions github-actions Bot added the needs-signed-commits Currently some or all of the commits in this PR are not signed label Oct 17, 2026
@time1043 time1043 changed the title docs: fix code block line number in tutorial-3-preload.md docs: fix extra blank line causing incorrect code highlighting Oct 17, 2026
@dsanders11

Copy link
Copy Markdown
Member

Thanks for the PR! These drifted as a result of some formatting changes, so rather than revert those formatting changes like in this PR, I've had Claude find other instances of drift and correct the line numbers for them all in #55097. Since that includes these two incorrect blocks, I'm going to close out this PR in favor of the superset in that PR. But thank you for bringing up the issue so it could be fixed. 👍

@dsanders11 dsanders11 closed this Oct 18, 2026
@time1043

Copy link
Copy Markdown
Author

Yeah, this one is a better approach. Glad the issue got caught. Thx for your reply! 😊

@time1043
time1043 deleted the patch-1 branch October 18, 2026 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation 📓 needs-signed-commits Currently some or all of the commits in this PR are not signed semver/patch backwards-compatible bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants