Skip to content

Conversation

@jovyntls
Copy link
Contributor

@jovyntls jovyntls commented Feb 20, 2023

What is the purpose of this pull request?

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

Overview of changes:
Fix an edge case in handling includes for empty segments - the desired result is to allow the empty segment to be included instead of throwing an error.

Testing instructions:
Minimal reproduction:

<div id="empty"></div>
<include src="#empty">

Proposed commit message: (wrap lines at 72 characters)

Fix handling of empty segment includes

Attempting to include an empty segment will throw a "hash not found"
error on the MarkBind console output.

This is a regression on existing behaviour introduced by refactoring on
includePanelProcessor.

Let's revert the original behaviour of allowing empty hashes to be
included, and add test cases to check for this.

Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

@jovyntls jovyntls requested a review from tlylt February 20, 2023 07:39
Copy link
Contributor

@tlylt tlylt left a comment

Choose a reason for hiding this comment

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

LGTM

@tlylt tlylt added this to the v4.1.1 milestone Feb 20, 2023
@tlylt
Copy link
Contributor

tlylt commented Feb 20, 2023

Let's put up an issue for discussion on the suggestion that if the fragment is empty, perhaps we can consider outputting a warning since that could be a case of incorrect usage.

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