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

feat: Add contextBefore & contextAfter handlebars helpers #51

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jez
Copy link

@jez jez commented Dec 29, 2024

Description

Fixes #50.

As outlined in the issue above, this change implements a possible solution.

It adds two new helper functions, contextBefore and contextAfter, which can
be used to extract the contextual text before and after the highlight.

Checklist

  • I accept the Code of Conduct
  • I have performed a self-review of my code for consistency and potential leftover debug logs, commented out code, etc.
  • I have added tests that prove that my feature works or that the fix is effective
  • I have checked that new and existing unit tests pass locally with my changes
  • I have updated the documentation accordingly (if necessary)
  • I confirm that this PR DOESN'T change the plugin's version either in the manifest.json or package.json files
  • I have checked that my commit messages are descriptive and follow the Conventional Commits standard
  • I have enabled the checkbox to allow maintainer edits so the branch can be updated for a merge.

@jez jez requested a review from bandantonio as a code owner December 29, 2024 15:39
@jez jez force-pushed the jez-context-before-after branch from f89be35 to cfdf55c Compare December 29, 2024 15:41
@jez jez force-pushed the jez-context-before-after branch from cfdf55c to d9ee579 Compare December 29, 2024 15:42
@bandantonio bandantonio added this to the ⏳1.6.0 milestone Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

[Request]: Highlight pre- and post-context
2 participants