{"repo":"steipete/Demark","free":true,"listed":false,"github":"https://github.com/steipete/Demark","clone":"git clone https://github.com/steipete/Demark.git","description":"HTML in. MD out. Blink-fast. The little helper that chomps HTML and spits pristine Markdown. Goodbye <div>, hello ##.","language":"Swift","stars":253,"topics":["markdown","swift"],"license":"MIT","category":"productivity","readme_excerpt":"Demark 🧽 — Scrub HTML down to Markdown Demark is a Swift package for converting HTML strings and rendered web pages to Markdown on Apple platforms. It uses Turndown.js in a WKWebView by default and includes an html-to-md engine backed by JavaScriptCore for simpler input. Install In Xcode, choose File → Add Package Dependencies and enter: For a Package.swift manifest, add the package and product dependency: Demark requires Swift 6 and has no external Swift Package dependencies. Quick start Call Demark from an async main-actor context: Output: Choose an engine Demark exposes two bundled conversion engines: Engine Runtime Use it for --- --- --- .turndown (default) WebKit and a browser DOM Complex or malformed HTML and configurable heading/code styles .htmlToMd JavaScriptCore on an internal serial queue Simple, well-formed HTML without a web view The public Demark API is main-actor isolated. If Turndown cannot complete a conversion, the default path retries the input with html-to-md . Both engines support custom bullet markers, skipped tags, and ignored tags; some formatting options are engine-specific. See Using Demark for the complete option table, engine behavior, and error model. Convert a web page Demark can load an HTTP or HTTPS URL in an ephemeral WKWebView , wait for the rendered document, and convert either the whole page or a selected element: URL conversion is available in Demark 1.2.0 and later. It requires WebKit and network access. Loading options cover timeouts, a","default_branch":null,"files":null,"tree":[],"storefront":"/r/steipete","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/steipete/Demark/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}