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

one-line bug in templatablepattern.py #2291

Merged
merged 1 commit into from
Sep 9, 2024

Conversation

jkmnt
Copy link
Contributor

@jkmnt jkmnt commented Jul 4, 2024

Description

  • [ -] Source branch in your fork has meaningful name (not main)

Fixes Issue:

The templatablepattern.py contained the bug:

    def read(self):
        if self._until_after:
            result += self._input.readUntilAfter(self._until_after) # should be self._until_pattern

the self._until_after is bool flag, while the readUntilAfter accepts the regexp.
The same code in templatablepattern.js uses the this._until_pattern correctly.

Before Merge Checklist

These items can be completed after PR is created.

(Check any items that are not applicable (NA) for this PR)

  • JavaScript implementation
  • [- ] Python implementation (NA if HTML beautifier)
  • Added Tests to data file(s)
  • Added command-line option(s) (NA if
  • README.md documents new feature/option(s)

@bitwiseman
Copy link
Member

The fact that this doesn't cause test failures means this code must not be exercised in Python.

@bitwiseman
Copy link
Member

Ah, I see. You discovered this as part of porting the HTML beautifier.

@bitwiseman bitwiseman merged commit 23126f9 into beautifier:main Sep 9, 2024
12 checks passed
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