# Implementation Guide

> r"-\s\n\s" should be replaced with "" (empty string) to join words.

- Skill: `tools-only/implementation-guide-5` (Agent Skill, multi-file: 3 files)
- Install (CLI): `npx skillmds@latest add tools-only/implementation-guide-5`
- Raw SKILL.md: https://api.skillmd.com/api/skills/tools-only/implementation-guide-5/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: tools-only (https://skillmd.com/u/tools-only)
- Updated: 2026-09-29
- Page: https://skillmd.com/skills/tools-only/implementation-guide-5

---


# Implementation Guide

## Code Structure
**How is the code organized?**

- `pdf_to_epub/validation/text_canonicalizer.py`

## Implementation Notes
**Key technical details to remember:**

### Unicode
Use python's `unicodedata` module.

### Ligatures Mapping
Include at least:
- `ﬁ` -> `fi`
- `ﬂ` -> `fl`
- `ﬀ` -> `ff`
- `ﬃ` -> `ffi`
- `ﬄ` -> `ffl`
- `æ` -> `ae`
- `œ` -> `oe`

### Hyphenation Regex
`r"-\s*\n\s*"` should be replaced with `""` (empty string) to join words.

## Error Handling
**How do we handle failures?**

- Ensure it handles `None` input.
- Log instances where aggressive mode makes "destructive" changes if possible.

