Merged
Conversation
…data persistence across multiple parses
…accessing the emoji map
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…performance Optimize smartypants handling
…lement generation
…or unkown reason it leaks data between while the same test outside of phpunit do not
…d improve performance and memory usage
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR implements the 2.0.0 release, overhauling the internal configuration system and optimizing multiple parsing paths.
- Introduces a compiled configuration schema with bitmask-based feature flags and payloads.
- Adds constructor
overridessupport and lazy-loading caches (emoji map, smartypants substitutions). - Updates tests to use renamed config keys (
smartypantsandheadings.allowed_levels).
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tests/TypographerTest.php | Renamed smarty config key to smartypants |
| tests/HeadingsTest.php | Renamed headings.allowed config key to headings.allowed_levels |
| src/ParsedownExtended.php | Bumped VERSION to 2.0.0; reworked constructor, config handling, inline parsers, removed deprecated methods, added early-return optimizations |
Comments suppressed due to low confidence (2)
src/ParsedownExtended.php:1989
- [nitpick] This TODO-style comment is vague. Either clarify the exact scenario or remove it if it's no longer accurate.
// BUG: Breaks formatting if written in a single line
src/ParsedownExtended.php:181
- You've introduced constructor
overridessupport but there are no tests covering it. Consider adding a unit test to verify overrides are applied correctly.
public function __construct(array $overrides = [])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Release 2.0.0 Highlights
Removed Deprecated configuration keys
abbreviations.allow_custom_abbrreplaced byabbreviations.allow_customabbreviations.predefinereplaced byabbreviations.predefinedemphasis.markingreplaced byemphasis.markheadings.allowedreplaced byheadings.allowed_levelssmartyreplaced bysmartypantssmarty.substitutions.left-angle-quotereplaced bysmartypants.substitutions.left_angle_quotetoc.toc_tagreplaced bytoc.tagmarkupreplaced byallow_raw_htmltoc.headingsreplaced bytoc.levels