-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sphinx-agent: Rewrite internal links
As part of its initial setup, the injected `webview.js` script now rewrites any `a.internal` links to include the port number of the current websocket connection. This ensures that as the user navigates by clicking on links on the page the websocket connection to the language server is preserved. Also by doing an initial scroll sync on page load, this ensures that the editor is kept in sync with the change! There is a chance for this to be a bit flaky as this in direct conflict with the initial sync an editor might want to make if it initiates the preview of a page. By introducing a small delay on the sync made by the webview, we are relying on the editor winning the race and getting its message in first... I'm sure that will never cause an issue in the future!
- Loading branch information
Showing
3 changed files
with
64 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
When clicking on internal links of a previewed page, the corresponding source file will be automatically opened in the editor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
The `esbonio.preview.showLineMarkers` option should now work again | ||
The `esbonio.preview.showLineMarkers` option should now work again. | ||
|
||
When clicking on internal links of a previewed page, the websocket connection to the language server is now preserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters