Whitespace Handling in html-to-markdown

Configure whitespace, newline, and indentation options for HTML to Markdown conversion.

836|66|Updated Feb 3, 2025
One-click install
npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill whitespace-handling-in-html-to-markdown
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Whitespace Handling in html-to-markdown
Source: https://github.com/kreuzberg-dev/html-to-markdown/tree/main/.ai-rulez/skills/whitespace-handling
Command: npx skills add https://github.com/kreuzberg-dev/html-to-markdown --skill whitespace-handling-in-html-to-markdown

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides fine-grained control over how whitespace, newlines, and indentation are handled when converting HTML to Markdown, ensuring the output matches your exact formatting requirements.

Core Features & Use Cases

  • Whitespace Modes: Choose between Normalized (collapses spaces, normalizes newlines) and Strict (preserves all whitespace exactly).
  • Newline Styles: Configure how <br> tags are rendered (Spaces or Backslash).
  • List Indentation: Control nested list indentation with Spaces or Tabs.
  • Wrapping Options: Enable line wrapping with configurable width and word preservation.
  • Use Case: Convert a poem from HTML to Markdown while preserving its exact line breaks and spacing, or clean up messy HTML from a CMS into a consistently formatted Markdown document.

Quick Start

Convert the provided HTML content using strict whitespace preservation and backslash newlines.

Frequently Asked Questions about Whitespace Handling in html-to-markdown

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Does HTML to Markdown conversion support custom line wrapping?

Yes, HTML to Markdown conversion supports custom line wrapping. You can enable line wrapping with configurable width and word preservation options, allowing you to tailor the output fidelity to match specific document length constraints.

What's the best way to clean up messy HTML formatting when converting to Markdown?

To clean up messy HTML formatting during conversion, use the Normalized whitespace mode. This mode collapses extra spaces and normalizes newlines, ensuring the resulting Markdown document has consistent formatting.

Can I configure how br tags are rendered in Markdown conversion?

Yes, you can configure how br tags are rendered during Markdown conversion. The Skill supports custom newline styles, allowing you to render line breaks as either Spaces or Backslash depending on your formatting preference.

How do I control list indentation when converting nested HTML lists to Markdown?

You can control nested list indentation during HTML to Markdown conversion by configuring the list indentation settings. The Skill supports indentation using either Spaces or Tabs to match your specific Markdown formatting requirements.

Does HTML to Markdown conversion support custom line wrapping?

Yes, HTML to Markdown conversion supports custom line wrapping. You can enable line wrapping with configurable width and word preservation options, allowing you to tailor the output fidelity to match specific document length constraints.