Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged

Conversation

ryoarmanda
Copy link
Contributor

@ryoarmanda ryoarmanda commented Apr 1, 2021

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!

Copy link
Contributor

@wxwxwxwx9 wxwxwxwx9 left a comment

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.

None yet

2 participants