Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 24 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,27 @@ jobs:
- name: Run examples
run: bash scripts/run-examples.sh

email-body:
name: Email body compatibility
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: dtolnay/rust-toolchain@1.96.0
- uses: Swatinem/rust-cache@v2
with:
key: email-body-rust-1.96
- name: Test decoded bodies without a MIME parser
run: |
cargo test --locked -p markkit --no-default-features --features email-body --lib email::
cargo test --locked -p markkit --no-default-features --features email-body,html --lib email::
cargo run --locked -p markkit --no-default-features --features email-body --example email_body
if cargo tree --locked -p markkit --no-default-features --features email-body,html -e normal | grep -E 'mail-parser|reqwest|hyper'; then
echo "MIME parser or HTTP client leaked into decoded email body views"
exit 1
fi

wasm:
# Browser package @everruns/markkit-wasm: build the wasm32-unknown-unknown
# bundle and run its headless Node tests. See knowledge/runtimes/wasm-package.md.
Expand Down Expand Up @@ -143,7 +164,7 @@ jobs:

check:
name: Check
needs: [lint, audit, test, wasm]
needs: [lint, audit, test, wasm, email-body]
runs-on: ubuntu-latest
if: always()
steps:
Expand All @@ -152,7 +173,8 @@ jobs:
if [[ "${{ needs.lint.result }}" != "success" ]] || \
[[ "${{ needs.audit.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.wasm.result }}" != "success" ]]; then
[[ "${{ needs.wasm.result }}" != "success" ]] || \
[[ "${{ needs['email-body'].result }}" != "success" ]]; then
echo "One or more jobs failed"
exit 1
fi
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

## [Unreleased]

## [0.3.3] - 2026-11-25

### Fixed

- Expose decoded email cleanup through `email-body` without requiring the MIME parser or Rust 1.98. The existing `email` feature still includes both APIs.

## [0.3.2] - 2026-11-25

### Security
Expand Down
14 changes: 7 additions & 7 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ members = [
]

[workspace.package]
version = "0.3.2"
version = "0.3.3"
edition = "2024"
license = "MIT"
authors = ["Everruns <oss@everruns.com>"]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ text, without URL fetching or OCR.

Rust callers with already-decoded email alternatives can use
[`email::extract_body`](https://docs.rs/markkit/latest/markkit/email/fn.extract_body.html)
with the `email` feature. It returns clean/full views and byte spans for omitted
with the `email-body` feature (also included by `email`). It returns clean/full views and byte spans for omitted
trailing quotes or mobile signatures, preserving forwarded and interleaved replies.
Text stays plain text; HTML fallback requires `html` and becomes Markdown. Treat
both views as untrusted content. See the runnable [email example](examples/email_body.rs).
Expand Down Expand Up @@ -249,6 +249,7 @@ in the message).
| Feature | Default | Description |
|---------|---------|-------------|
| `html` | Yes | HTML parsing and conversion |
| `email-body` | No | Clean/full views of decoded email bodies, without a MIME parser; add `html` for HTML alternatives |
| `pdf`, `docx`, `pptx`, `spreadsheet`, `odt`, `epub`, `email`, `markdown` | No | Format support, see [Supported formats](#supported-formats) |
| `all_formats` | No | All of the above |
| `pdf-ocr` | No | OCR for textless PDF pages: Hayro rendering + installed Tesseract |
Expand Down
2 changes: 1 addition & 1 deletion crates/markkit-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ odt = ["markkit/odt"]
epub = ["markkit/epub"]

[dependencies]
markkit = { path = "../markkit", version = "0.3.2", features = ["tool"] }
markkit = { path = "../markkit", version = "0.3.3", features = ["tool"] }
tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "io-std", "io-util"] }
clap.workspace = true
anyhow.workspace = true
Expand Down
2 changes: 1 addition & 1 deletion crates/markkit-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@everruns/markkit",
"version": "0.3.2",
"version": "0.3.3",
"description": "Extract clean markdown from any format – Node.js bindings",
"main": "index.js",
"types": "index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion crates/markkit-wasm/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@everruns/markkit-wasm",
"version": "0.3.2",
"version": "0.3.3",
"description": "Extract clean Markdown from HTML, DOCX and spreadsheets in the browser and edge runtimes (WebAssembly). Includes an LLM agent tool.",
"type": "module",
"main": "index.js",
Expand Down
6 changes: 4 additions & 2 deletions crates/markkit/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ docx = ["dep:zip", "dep:quick-xml"]
pptx = ["dep:zip", "dep:quick-xml"]
spreadsheet = ["dep:calamine", "dep:zip", "dep:quick-xml", "dep:cfb"]
markdown = ["dep:pulldown-cmark"]
email = ["dep:mail-parser"]
# Decoded provider bodies need neither MIME parsing nor its toolchain requirements.
email-body = []
email = ["email-body", "dep:mail-parser"]
odt = ["dep:zip", "dep:quick-xml"]
epub = ["html", "dep:zip", "dep:quick-xml"]
# Opt-in: the default build has no network stack (no reqwest/hyper/TLS).
Expand Down Expand Up @@ -168,4 +170,4 @@ harness = false
[[example]]
name = "email_body"
path = "../../examples/email_body.rs"
required-features = ["email"]
required-features = ["email-body"]
2 changes: 1 addition & 1 deletion crates/markkit/fuzz/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion crates/markkit/src/email.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//! trailing quoted block is hidden; inline replies and forwarded mail remain
//! whole. Hosts retain MIME originals and enforce their own access policy.
//!
//! With the `email` feature enabled:
//! With the `email-body` feature enabled (`email` also includes it):
//! ```
//! use markkit::{email::{extract_body, EmailBody}, Limits};
//! let view = extract_body(EmailBody {
Expand Down
2 changes: 1 addition & 1 deletion crates/markkit/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ pub mod config;
mod csv;
#[cfg(feature = "docx")]
mod docx;
#[cfg(feature = "email")]
#[cfg(feature = "email-body")]
pub mod email;
#[cfg(feature = "email")]
mod eml;
Expand Down
4 changes: 3 additions & 1 deletion knowledge/formats/format-support.md
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,9 @@ decoded in the pre-scan, and separately the total content interpreted, form reus
## Decoded email body views

The Rust `email::extract_body` API accepts provider-decoded text and HTML without
requiring callers to synthesize MIME. It prefers text, otherwise extracts HTML
requiring callers to synthesize MIME. The `email-body` feature exposes this API
without a MIME dependency; the existing `email` feature includes it alongside
EML parsing. A Rust 1.96 consumer gate covers body-only and HTML alternatives. It prefers text, otherwise extracts HTML
without remote image loading. It returns both a full normalized representation
and a clean view with omission spans. Only conservative trailing quotes and exact
mobile signatures are removed; forwarded and interleaved content is retained.
Expand Down
4 changes: 4 additions & 0 deletions knowledge/log.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Markkit Knowledge Update Log

## 2026-11-26

- Split decoded email body views into `email-body`, preserving `email` as the full EML feature; add a Rust 1.96 compatibility and dependency-isolation gate.

## 2026-11-25

- [Release Process](operations/release-process.md): prepare v0.3.2 across Rust, Python, native npm and WASM; includes reviewed dependency migrations, output-safety fixes, email body views, documentation and licensing updates. Publication remains verified separately on the release tag.
Expand Down
4 changes: 4 additions & 0 deletions knowledge/operations/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ each security test states exactly which bytes it feeds the parser.
- **Eval**: `just eval` scores extraction quality (mira study, not a gate); its
unit tests run in `cargo test`. See [Evaluation Harness](eval.md)

The independent Email body compatibility job builds and tests `email-body` on
Rust 1.96, both with and without HTML, and rejects a MIME parser or HTTP client
in its normal dependency graph. Full `email` still exercises the EML suite.

## Rules

- Write the failing test first, then fix
Expand Down
Loading