Skip to content

Lazy serve: Fix improper handling of incomplete active urls#1532

Merged
wxwxwxwx9 merged 1 commit into
MarkBind:masterfrom
ryoarmanda:multi-tab-dev-handle-incomplete-urls
Apr 2, 2021
Merged

Lazy serve: Fix improper handling of incomplete active urls#1532
wxwxwxwx9 merged 1 commit into
MarkBind:masterfrom
ryoarmanda:multi-tab-dev-handle-incomplete-urls

Conversation

@ryoarmanda

@ryoarmanda ryoarmanda commented Apr 1, 2021

Copy link
Copy Markdown
Contributor

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • Others, please explain:

Bug reported and acknowledged in #1522 (comment).

Incomplete urls are defaulted to index.md in the path specified, e.g. hostName/userGuide serves hostName/userGuide/index, though the request URL is still referring to hostName/userGuide. This results in getActiveUrls returning just /userGuide, which will be stored as userGuide to the current opened pages list, and thus any file change to the actual file userGuide/index can not be detected and rebuilt accordingly.

Overview of changes:

  • Adds a processing step of active urls retrieved from live-server before passing it to MarkBind's opened pages list, to append index on every incomplete urls.

Anything you'd like to highlight / discuss:

Testing instructions:

  • Try opening 127.0.0.1:8080 (without /index)
  • Edit root's index.md
  • Verify that MarkBind correctly logs that the current opened pages list is index.

Proposed commit message: (wrap lines at 72 characters)
Lazy serve: Fix improper handling of incomplete active urls


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No blatantly unrelated changes
  • Pinged someone for a review!

@ryoarmanda ryoarmanda requested a review from wxwxwxwx9 April 1, 2021 16:32

@wxwxwxwx9 wxwxwxwx9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@wxwxwxwx9 wxwxwxwx9 merged commit feb60fd into MarkBind:master Apr 2, 2021
@wxwxwxwx9 wxwxwxwx9 added this to the v3.0 milestone Apr 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants