Skip to content

perf(markdown): fast-path plain Hebrew text and avoid per-character callbacks - #37

Merged
palmoni5 merged 1 commit into
mainfrom
palmoni5/markdown-hebrew-plain-text-fast-path-20261111
Nov 11, 2026
Merged

palmoni5 merged 1 commit into
mainfrom
palmoni5/markdown-hebrew-plain-text-fast-path-20261111

Conversation

@palmoni5

@palmoni5 palmoni5 commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Include the Hebrew block (U+0590–U+05FF: letters, niqqud, cantillation, maqaf, geresh) in the plain-text accelerator when every inline syntax is a built-in one from the commonMark, gitHubFlavored or gitHubWeb extension sets.
  • Keep character-by-character matching when any custom inline syntax is present, since it might match inside a Hebrew word.
  • Replace the per-character syntaxes.any closure with a direct loop.
  • No public API change.

Verification

  • dart format, dart analyze --fatal-infos, dart test pass.
  • HTML and AST output are byte-identical to the base on 43k inputs (spec suites, pub-cache READMEs/CHANGELOGs, a Hebrew corpus, 40k fuzz cases) across all extension sets, custom syntaxes, inlineOnly and renderer reuse.
  • Benchmark (AOT, 1 MB of Hebrew): default 205 → 38 ms, gitHubWeb 495 → 143 ms; English unchanged within noise.

@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

PR Health

Publish ✔️
Package Version Status Publish tag (post-merge)
package:markdown ⭐ 7.4.1-wip WIP (no publish necessary)
  • 16 already published.
  • 26 WIP (no publish necessary).

Documentation at https://github.com/dart-lang/ecosystem/wiki/Publishing-automation.

This check can be disabled by tagging the PR with skip-publish-check.

Changelog Entry ✔️
Package Changed Files

Changes to files need to be accounted for in their respective changelogs.

This check can be disabled by tagging the PR with skip-changelog-check (for example, for non-user-visible changes when the package version is already at -wip).

Breaking changes ✔️
Package Change Current Version New Version Needed Version Looking good?
markdown Non-Breaking 7.3.1 7.4.1-wip 7.4.1-wip ✔️

This check can be disabled by tagging the PR with skip-breaking-check.

API leaks ✔️

The following packages contain symbols visible in the public API, but not exported by the library. Export these symbols or remove them from your publicly visible API.

Package Leaked API symbol Leaking sources

This check can be disabled by tagging the PR with skip-leaking-check.

Unused Dependencies ✔️
Package Status
markdown ✔️ All dependencies utilized correctly.

For details on how to fix these, see dependency_validator.

This check can be disabled by tagging the PR with skip-unused-dependencies-check.

License Headers ✔️
// Copyright (c) 2026, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

Files
no missing headers

All source files should start with a license header.

Unrelated files missing license headers
Files
pkgs/html/test/differential_test.dart
pkgs/html/test/dom_parsing_test.dart
pkgs/html/test/mxss_test.dart
pkgs/html/test/noah_ark_clause_limit_test.dart

This check can be disabled by tagging the PR with skip-license-check.

Coverage ✔️
File Coverage
pkgs/markdown/lib/src/inline_parser.dart 💚 99 % ⬆️ 0 %

This check for test coverage is informational (issues shown here will not fail the PR).

This check can be disabled by tagging the PR with skip-coverage-check.

@palmoni5
palmoni5 force-pushed the palmoni5/markdown-hebrew-plain-text-fast-path-20261111 branch from 04fce8f to b3190fc Compare November 11, 2026 17:12
@palmoni5
palmoni5 merged commit 53b2d61 into main Nov 11, 2026
17 checks passed
@palmoni5
palmoni5 deleted the palmoni5/markdown-hebrew-plain-text-fast-path-20261111 branch November 11, 2026 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant