Test cases / html

deft html to-md

Convert to Markdown; scripts and styles are dropped

1 run on real files, 5 tests on generated files, not shown. 0 failed.

Fixed cases

Generated files, compared with ground truth by tools other than deft.

a real Wikipedia articlePassed

deft html to-md markdown-article.html -o out.md

Input

<!DOCTYPE html>
<html class="client-nojs vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available skin-thumbsize-clientpref-standard skin-underline-clientpref-browser" lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<title>Markdown - Wikipedia</title>
<script>(function(){var className="client-js vector-feature-language-in-header-enabled vector-feature-language-in-main-menu-disabled vector-feature-language-in-main-page-header-disabled vector-feature-page-tools-pinned-disabled vector-feature-toc-pinned-clientpref-1 vector-feature-main-menu-pinned-disabled vector-feature-limited-width-clientpref-1 vector-feature-limited-width-content-enabled vector-feature-custom-font-size-clientpref-1 vector-feature-appearance-pinned-clientpref-1 skin-theme-clientpref-day vector-sticky-header-enabled vector-toc-available skin-thumbsize-clientpref-standard skin-underline-clientpref-browser";var cookie=document.cookie.match(/(?:^|; )enwikimwclientpreferences=([^;]+)/);if(cookie){cookie[1].split('%2C').forEach(function(pref){className=className.replace(new RegExp('(^| )'+pref.replace(/-clientpref-\w+$|[^\w-]+/g,'')+'-clientpref-\\w+( |$)'),'$1'+pref+'$2');});}document.documentElement.className=className;}());RLCONF={"wgBreakFrames":false,"wgSeparatorTransformTable":["",""],"wgDigitTransformTable":["",""],"wgDefaultDateFormat":"dmy","wgMonthNames":["","January","February","March","April","May","June","July","August","September","October","November","December"],"wgRequestId":"fa9758f9-9067-49db-bdf6-8ee30e0e5044","wgCanonicalNamespace":"","wgCanonicalSpecialPageName":false,"wgNamespaceNumber":0,"wgPageName":"Markdown","wgTitle":"Markdown","wgCurRevisionId":1383305779,"wgRevisionId":1383305779,"wgArticleId":2415885,"wgIsArticle":true,"wgIsRedirect":false,"wgAction":"view","wgUserName":null,"wgUserGroups":["*"],"wgCategories":["Articles with short description","Short description is different from Wikidata","Articles lacking reliable references from September 2025","All articles lacking reliable references","Use dmy dates from September 2026","All articles with unsourced statements","Articles with unsourced statements from September 2025","Computer-related introductions in 2004","Lightweight markup languages","Open formats"],"wgPageViewLanguage":"en","wgPageContentLanguage":"en","wgPageContentModel":"wikitext","wgRelevantPageName":"Markdown","wgRelevantArticleId":2415885,"wgTempUserName":null,"wgIsProbablyEditable":true,"wgRelevantPageIsProbablyEditable":true,"wgRestrictionEdit":[],"wgRestrictionMove":[],"wgNoticeProje
… 196510 more characters

Output

out.md 93.0 KB
[Jump to content](#bodyContent)

 Main menu

Main menu

move to sidebar hide

Navigation

*   [Main page](/wiki/Main_Page "Visit the main page [z]")
*   [Contents](/wiki/Wikipedia:Contents "Guides to browsing Wikipedia")
*   [Current events](/wiki/Portal:Current_events "Articles related to current events")
*   [Random article](/wiki/Special:Random "Visit a randomly selected article [x]")
*   [About Wikipedia](/wiki/Wikipedia:About "Learn about Wikipedia and how it works")
*   [Contact us](//en.wikipedia.org/wiki/Wikipedia:Contact_us "How to contact Wikipedia")

Contribute

*   [Help](/wiki/Help:Contents "Guidance on how to use and edit Wikipedia")
*   [Learn to edit](/wiki/Help:Introduction "Learn how to edit Wikipedia")
*   [Community portal](/wiki/Wikipedia:Community_portal "The hub for editors")
*   [Recent changes](/wiki/Special:RecentChanges "A list of recent changes to Wikipedia [r]")
*   [Upload file](/wiki/Wikipedia:File_upload_wizard "Add images or other media for use on Wikipedia")
*   [Special pages](/wiki/Special:SpecialPages "A list of all special pages [q]")

[![](/static/images/icons/enwiki-25.svg) ![Wikipedia](/static/images/mobile/copyright/wikipedia-wordmark-en-25.svg) ![The Free Encyclopedia](/static/images/mobile/copyright/wikipedia-tagline-en-25.svg)](/wiki/Main_Page)

[Search](/wiki/Special:Search "Search Wikipedia [f]")

Search

 Appearance

*   [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en)
*   [Create account](/w/index.php?title=Special:CreateAccount&returnto=Markdown&returntoquery=oldid%3D1383305779 "You are encouraged to create an account and log in; however, it is not mandatory")
*   [Log in](/w/index.php?title=Special:UserLogin&returnto=Markdown&returntoquery=oldid%3D1383305779 "You're encouraged to log in; however, it's not mandatory. [o]")

 Personal tools

*   [Donate](https://donate.wikimedia.org/?wmf_source=donate&wmf_medium=sidebar&wmf_campaign=en.wikipedia.org&uselang=en)
*   [Create account](/w/index.php?title=Special:CreateAccount&returnto=Markdown&returntoquery=oldid%3D1383305779 "You are encouraged to create an account and log in; however, it is not mandatory")
*   [Log in](/w/index.php?title=Special:UserLogin&returnto=Markdown&returntoquery=oldid%3D1383305779 "You're encouraged to log in; however, it's not mandatory. [o]")

## Contents

move to sidebar hide

*   [(Top)](#)

*   [1 History](#History)

*   [2 Rise and divergence](#Rise_and_divergence)

*   [3 CommonMark](#CommonMark)

     Toggle CommonMark subsection
    *   [3.1 Standardization](#Standardization)

    *   [3.2 Name](#Name)

    *   [3.3 Adoption](#Adoption)
*   [4 Variants](#Variants)

     Toggle Variants subsection
    *   [4.1 GitHub Flavored Markdown](#GitHub_Flavored_Markdown)

    *   [4.2 Markdown Extra](#Markdown_Extra)
*   [5 Examples](#Examples)

*   [6 Implementations](#Implementations)

*   [7 See also](#See_also)

*   [8 Explanatory notes](#Explanatory_note
… 91820 more characters
What it printed
ok html.to-md markdown-article.html -> out.md  93KB  0.01s
Automatic checks (1)
  • text: absent = ["<script", "<style"], contains = ["Markdown", "Gruber"], file = "out.md"