Browse Source

docs: update code highlights in tutorial (#36767)

docs: fix code highlighting in preload tutorial

The highlighted lines in the code snippets were unaligned,
which could cause a newcomer unneeded confusion on what
lines need to be changed.

Co-authored-by: Roger Zurawicki <[email protected]>

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: Roger Zurawicki <[email protected]>
trop[bot] 2 years ago
parent
commit
bb88737b9c
1 changed files with 1 additions and 1 deletions
  1. 1 1
      docs/tutorial/tutorial-3-preload.md

+ 1 - 1
docs/tutorial/tutorial-3-preload.md

@@ -81,7 +81,7 @@ contextBridge.exposeInMainWorld('versions', {
 To attach this script to your renderer process, pass its path to the
 `webPreferences.preload` option in the BrowserWindow constructor:
 
-```js {8-10} title="main.js"
+```js {2,8-10} title="main.js"
 const { app, BrowserWindow } = require('electron')
 const path = require('path')