markdown
A portable Markdown library written in Dart that can parse Markdown into HTML.
7.3.1
2.5M downloads/mo
#233 most downloaded on pub.dev
dart-lang/tools
What this package is like to depend on
Last release 5 months ago
18 Mar 2026
Release timing varies
gaps range from 5 weeks to 1.2 years
Most releases are documented
notes for 47 of 54 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
55 releases · first in 2013
1 release in the last 12 months
see the full history below
Release timeline
55 releases · Feb 2013 to Mar 2026Releases
latest 55-
7.3.118 Mar 2026Release notes
Open source →- Preserve metadata passed to fenced code blocks as
data-metadataon the createdpreelement. - Update the README link to the markdown playground (https://dart-lang.github.io/tools).
- Update
package:webAPI references in the example. - Fix performance and correctness of HTML comment parser.
- Optimize indentation processing of fenced code blocks.
- Fix an issue with nested list structure when indented by tabs (#2172).
- Deprecated
LinkContextandBlockParser.standardBlockSyntaxes. Implementation members that should never have been made public. - Require Dart
^3.9.0.
- Preserve metadata passed to fenced code blocks as
-
7.3.013 Jan 2025Release notes
Open source →- Move to
dart-lang/toolsmonorepo. - Fix an issue with checkbox list items separated with blank lines (#602).
- Require package
web: '>=0.4.2 <2.0.0'. - Fix several
RangeErrorhazards in links (#623). - Export
LinkReferenceDefinitionSyntaxpublicly (#626).
- Move to
-
7.2.207 Mar 2024Release notes
Open source →- Fix a crash parsing alert block syntax (#584).
- Have alert block syntax support multiple paragraphs (#577).
- Require Dart
^3.2.0.
-
7.2.119 Jan 2024 -
7.2.017 Jan 2024Release notes
Open source →- Require Dart
^3.1.0. - Update all CommonMark specification links to 0.30.
- Fix beginning of line detection in
AutolinkExtensionSyntax. - Add a new syntax
AlertBlockSyntaxto parse GitHub Alerts.
- Require Dart
-
7.1.113 Jul 2023Release notes
Open source →- Fix delimiter row matching pattern for tables.
- Tables are now able to interrupt other blocks.
- Fix an obscure issue with HtmlBlockSyntax.
-
7.1.002 May 2023Release notes
Open source →- Support for footnotes.
- Fixed bug causing infinite loop for links inside tables.
-
7.0.231 Mar 2023Release notes
Open source →- Require Dart 2.19
- Fix an issue in
HeaderWithIdSyntax, do not generate heading IDs for headings with no content.
-
7.0.115 Feb 2023Release notes
Open source →- Remove RegExp lookarounds from autolink extension patterns. (Fixes issues when running on Safari.)
-
7.0.010 Feb 2023Release notes
Open source →- Breaking change:
close()ofDelimiterSyntaxandLinkSyntaxreturns multiple nodes instead of single one. - Breaking change: Remove deprecated APIs, including
TagSyntax,indicatorForCheckedCheckBox, andindicatorForUncheckedCheckBox. - Breaking change: Removed
BlockHtmlSyntax,BlockTagBlockHtmlSyntax,LongBlockHtmlSyntax, andOtherTagBlockHtmlSyntax. - Breaking change: Change the
lineproperties of typeStringtoLine. - Breaking change: Change the
linesproperties of typeList<String>toList<Line>. - Add a new syntax
HtmlBlockSyntaxto parse HTML blocks. - Add an
enableTagfilteroption toHtmlRendererto eanble GFMtagfilterextension. - Add a new syntax
DecodeHtmlSyntaxto decode HTML entity and numeric character references. - Add a new syntax
SoftLineBreakSyntaxto remove the single space before the line ending. - Add a new syntax
EscapeHtmlSyntaxto encode ("), (<), (>) and (&). - Add an option
caseSensitivetoTextSyntax. - Add a new public method
parse(String text)forDocument. - Add a new public method
parseLineList(List<Line> text)forDocument. - Add a new type:
Line. - Add a new optional parameter
parentSyntaxforparseLines()ofBlockParser, which can be used when parsing nested blocks. - Add a new optional parameter
disabledSetextHeadingforparseLines()ofBlockParser, which is used to disable theSetextHeaderSyntax. - Add a new public property
previousSyntaxforBlockParser.
- Breaking change:
-
6.0.120 Sep 2022Release notes
Open source →- Fix a crash in checkbox lists when mixing checkbox items with non-checkbox items.
-
6.0.010 Aug 2022Release notes
Open source →- Require Dart 2.17
- Add support to GFM extension for GitHub task lists (aka checkboxes). These
are only active in the
gitHubFlavoredandgitHubWebextension sets. - Add support for
#ff0000color swatches. - Change emoji list do be derived from the GitHub API. The only two emoji that
visually change are
:cricket:and:beetle:. There are alternate emoji:cricket_game:and:lady_beetle:which can be used to access the previous emoji.update_github_emoji.dartnow pulls all emoji info directly from GitHub API and as a result we have now support the entire GitHub emoji set (excluding the 19 custom GitHub specific emoji which have no Unicode support). - Breaking change: The
TagSyntaxis deprecated. - Add new syntax
DelimiterSyntax. - Breaking change:
StrikethroughSyntaxnow extendsDelimiterSyntaxinstead ofTagSyntax. - Breaking change:
LinkSyntaxnow extendsDelimiterSyntaxinstead ofTagSyntax. - Add two new emphasis syntaxes
EmphasisSyntax.underscoreandEmphasisSyntax.asterisk.
-
5.0.001 Apr 2022Release notes
Open source →- Breaking change: Change the type of
parseInline's parameter fromString?toString. - Fix table-rendering bug when table rows have trailing whitespace. #368.
- Do not allow reference link labels to contain left brackets. Thanks @chenzhiguang. #335.
- Treat lines matching a code block syntax as continuations of paragraphs, inside blockquotes. Thanks @chenzhiguang. #358.
- Add a syntax for GitLab-flavored fenced blockquotes. GitLab-flavored Markdown will be evaluated into an ExtensionSet, in a future release. Thanks @chenzhiguang. #359.
- Add
bool withDefaultInlineSyntaxesandbool withDefaultBlockSyntaxesparameters tomarkdownToHtmlandDocumentto support the case of specifying exactly the list of desired syntaxes. Thanks @chenzhiguang. #393.
- Breaking change: Change the type of
-
4.0.119 Nov 2021Release notes
Open source →- Export
src/emojis.dartin public API. - Update version of example page.
- Internal: enforce lint rules found in the lints package.
- Bump io dependency to
^1.0.0.
- Export
-
4.0.011 Feb 2021Release notes
Open source →- Stable null safety release.
- Require the latest
args, update the markdown executable to be opted in.
-
4.0.0-nullsafety.006 Jan 2021 pre-releaseRelease notes
Open source →- Migrate package to Dart's null safety language feature, requiring Dart 2.12 or higher.
- Breaking change: The TagSyntax constructor no longer takes an
endparameter. TagSyntax no longer implementsonMatchEnd. Instead, TagSyntax implements a method calledclosewhich creates and returns a Node, if a Node can be created and closed at the current position. If the TagSyntax instance cannot create a Node at the current position, the method should returnnull. Some TagSyntax subclasses will unconditionally create a tag inclose, while others may be unable to, such as LinkSyntax, if an inline or reference link could not be resolved. - Improved parsing of nested links, images, and emphasis. CommonMark compliance of emphasis-parsing improves to 99%, and link-parsing compliance rises to 93%. Overall compliance improves to 94% and overall GitHub-flavored Markdown improves to 93%.
-
3.0.012 Oct 2020Release notes
Open source →- Adds discovery API to find both a configuration and its location:
findPackageConfigAndFileandfindPackageConfigAndUri. - Removes support for the
.packagesfile.
The Dart SDK no longer supports that file, and no new.packagesfiles
will be generated.
Since the SDK requirement for this package is above 3.0.0,
no supporting SDK can use or generate.packages. - Simplifies API that no longer needs to support two separate files.
- Renamed
readAnyConfigFiletoreadConfigFile, and removed
thepreferNewestparameter. - Same for
readAnyConfigFileUriwhich becomesreadConfigFileUri. - Old functions still exists as deprecated, forwarding to the new
functions without thepreferNewestargument.
MakesPackageConfig,PackageandLanguageVersion@sealedclasses,
in preparation for making themfinalin a future update.
- Renamed
- Adds
PackageConfig.minVersionto complement.maxVersion.
Currently both are2.
Release notes
Open source →- Breaking change: Remove
ListSyntax.removeLeadingEmptyLine,ListSyntax.removeTrailingEmptyLines,TableSyntax.parseAlignments,TableSyntax.parseRow. - Allow intra-word strikethrough in GFM (#300).
- Breaking change: Change
BlockSyntax.canEndBlockfrom a getter to a method accepting a BlockParser.
- Adds discovery API to find both a configuration and its location:
-
2.1.817 Aug 2020Release notes
Open source →- Deprecate the public methods
ListSyntax.removeLeadingEmptyLine,ListSyntax.removeTrailingEmptyLines,TableSyntax.parseAlignments,TableSyntax.parseRow. These will be made private in a major version bump as early as 3.0.0.
- Deprecate the public methods
-
2.1.731 Jul 2020 -
2.1.511 Jun 2020Release notes
Open source →- Overhaul table row parsing. This does not have many consequences, except that whitespace around escaped pipes is handled better. (#287).
-
2.1.428 May 2020Release notes
Open source →- Correctly parse a reference link with a newline in the link reference part (#281).
-
2.1.326 Nov 2019Release notes
Open source →- Do not encode HTML in link URLs. Also do not encode HTML in link text when
encodeHtmlis false (e.g. when used in Flutter).
- Do not encode HTML in link URLs. Also do not encode HTML in link text when
-
2.1.215 Nov 2019Release notes
Open source →- Drop support for Dart 2.0.0 through 2.1.0.
- Recognize Unicode ellipsis (…) and other Unicode punctuation as punctuation when parsing potential emphasis.
- Reduce time to parse a large HTML-block-free Markdown document (such as that in #271) by more than half.
- Add a new optional parameter for InlineSyntax(),
startCharacter, where a subclass can specify a single character to try to match, before matching with more expensive regular expressions.
-
2.1.125 Sep 2019 -
2.1.023 Sep 2019Release notes
Open source →- Improve strict spec compliance of
>handling by always encoding as>– unless preceded by/. - Improve strict spec compliance for
blockquoteby always putting the closing tag on a new line. - Improve strict spec compliance for
codeelements defined with "`". - Properly encode
<,>, and"as their respective HTML entities when interpreted as text. - Improve inline code parsing when using multiple backticks.
- Do not encode HTML in indented code blocks when
encodeHtmlis false (e.g. when used in Flutter).
- Improve strict spec compliance of
-
2.0.316 Apr 2019Release notes
Open source →- Render element attributes in the order they were defined. Aligns more closely with the strict spec definition.
- Correctly render
&within inline image titles. - Add 68 new GitHub emoji.
- Escape HTML attribute for fenced code blocks, in the info string.
-
2.0.216 Jul 2018 -
2.0.102 Jul 2018 -
2.0.009 May 2018Release notes
Open source →-
Breaking change: The
Linkclass has been renamedLinkReference, and theDocumentfield,refLinks, has been renamedlinkReferences. -
Breaking change: Remove the deprecated
ExtensionSet.gitHubfield. UseExtensionSet.gitHubFlavoredinstead. -
Breaking change: Make all of the fields on
Documentread-only. -
Overhaul support for emphasis (
*foo*and_foo_) and strong emphasis (**foo**and__foo__), dramatically improving CommonMark compliance. -
Overhaul support for links and images, again dramatically improving CommonMark compliance.
-
Improve support for tab characters, and horizontal rules.
-
Add support for GitHub Flavored Markdown's Strikethrough extension. See the GFM spec.
-
The above fixes raise compliance with the CommonMark specs to 93%, and compliance with the GFM specs to 92%.
-
Add an
encodeHtmlparameter toDocument, which defaults to true. When false, HTML entities (such as©and the<character) will not be escaped, useful when rendering Markdown in some output format other than HTML. -
Allow the binary script to take a
--extension-setoption.A reminder: You can run
bin/markdown.dartfrom anywhere via:$ pub global activate markdown $ markdown
-
-
1.1.130 Dec 2017Release notes
Open source →- Add support for GitHub's colon-based Emoji syntax. :tada:! This is available
in the
gitHubWebextension set.
- Add support for GitHub's colon-based Emoji syntax. :tada:! This is available
in the
-
1.1.020 Dec 2017Release notes
Open source →- Make the constructor for ExtensionSet public, for tools like dartdoc.
- Split the
gitHubExtensionSet into two sets:gitHubFlavored, which represents the GitHub Flavored Markdown spec, andgitHubWeb, which represents what GitHub actually renders Markdown.
-
1.0.002 Nov 2017Release notes
Open source →- Fix issue where
acceptcould cause an exception. - Remove deprecated
escapeHtmlfunction. - Fix compliance with auto-links, including support for email addresses.
- Updated
ExtensionSet.gitHubto more closely align with GitHub markdown.
- Fix issue where
-
0.11.413 Jun 2017Release notes
Open source →- Fix bug with lazy blockquote continuations (#162)
- Fix bug with list item continuations (#156)
-
0.11.306 Apr 2017 -
0.11.209 Dec 2016Release notes
Open source →- Fix reference code links inside blockquotes.
- Add src/util.dart to exports.
-
0.11.114 Sep 2016Release notes
Open source →- Add version information:
dart bin/markdown.dart --versionnow shows the package version number.- The playground app now shows the version number.
- Improve autolink parsing.
- Add new table syntax:
TableSyntax. - Add new ExtensionSet that includes the table syntax:
ExtensionSet.gitHub. - For development: added
tool/travis.sh. - Support multiline Setext headers.
- Handle loose-vs-strict list items better.
- Support ordered lists that start with a number other than 1.
- Add version information:
-
0.11.003 Aug 2016Release notes
Open source →- Parse HTML blocks more accurately, according to CommonMark.
- Support shortcut reference links.
- Don't allow an indented code block to interrupt a paragraph.
- Change definition of "loose" and "strict" lists (items wrapped in paragraph tags vs not) to CommonMark's. The primary difference is that any single list item can trigger the entire list to be marked as "loose", rather than defining "looseness" on each specific item.
- Fix paragraph continuations in blockquotes and list items.
- Fix silly typing bug with
tool/common_mark_stats.dart, which resulted in a dramatic overestimate of our CommonMark compliance. - There are now 427/613 (69%) passing CommonMark v0.25 specs.
-
0.11.0+106 Aug 2016 -
0.10.124 May 2016Release notes
Open source →- Parse hard line breaks properly (#86). Thanks @mehaase!
- Fix processing of
[ ... ]syntax when no resolver is specified (#92). - There are now 401/613 (65%) passing CommonMark v0.24 specs. (Actually: after 0f64c8f the actual number of passing tests was 352/613 (57%).)
-
0.10.028 Mar 2016Release notes
Open source →- BREAKING: Now following the CommonMark spec for fenced code blocks.
If a language (info string) is provided, it is added as a class to the
codeelement with alanguage-prefix. - BREAKING: Now following the CommonMark spec for images. Previously,
would compile too<a href="img.prg"><img src="img.prg" alt="text"></img></a>. That same code will now compile to<img src="img.png" alt="text" />. - Fix all strong mode errors.
- BREAKING: Now following the CommonMark spec for fenced code blocks.
If a language (info string) is provided, it is added as a class to the
-
0.9.010 Nov 2015Release notes
Open source →- BREAKING: The text
[foo] (bar)no longer renders as an inline link (#53). - BREAKING: Change list parsing to allow lists to begin immediately after a preceding block element, without a blank line in between.
- Formalize an API for Markdown extensions (#43).
- Introduce ExtensionSets. FencedCodeBlock is considered an extension, but
existing usage of
markdownToHtml()andnew Document()will use the default extension set, which isExtensionSet.commonMark, which includes FencedCodeBlock. - Inline HTML syntax support; This is also considered an extension (#18).
- The text
[foo]()now renders as an inline link. - Whitespace now allowed between a link's destination and title (#65).
- Header identifier support in the HeaderWithIdSyntax and SetextHeaderWithIdSyntax extensions.
- Implement backslash-escaping so that Markdown syntax can be escaped, such as
[foo]\(bar) ==> <p>[foo](bar)</p>. - Support for hard line breaks with either
\\\nor <code> \n</code> (#30, #60). - New public method for BlockParser:
peek(int linesAhead), meant for use in subclasses. - New public members for ListSyntax:
blocksInListanddetermineBlockItems(), meant for use in subclasses. - Improve public docs (better, and more of them).
- BREAKING: The text
-
0.8.014 Sep 2015 -
0.7.206 Aug 2015 -
0.7.1+103 Jan 2015Nothing published for this version
-
0.7.1+203 Jan 2015 -
0.7.1+303 Aug 2015 -
0.7.011 Apr 2014Nothing published for this version
-
0.6.028 Mar 2014Release notes
Open source →- Breaking Change:
sdkPathnow returnsString?(returningnullif no
valid Dart SDK can be located). - Support robust SDK discovery for AOT-compiled tools (
dart install,
dart build cli) probingPlatform.resolvedExecutable,DART_ROOT,
DART_SDK, systemPATH(with Flutter wrapper layout awareness), and
FLUTTER_ROOT. - Add
dartExecutablegetter (String?) to locate thedartbinary. - Add
isValidSdkPath(String candidatePath)validation helper.
- Breaking Change:
-
0.6.0+130 Mar 2014Nothing published for this version
-
0.5.106 Mar 2014Release notes
Open source →- Add
showMultiSelectDialogandshowSingleSelectDialogto new
cli_componentslibrary, as well as an example. - Adds a
package:cli_util/windows_compatibility.dartlibrary which initially
contains just theWin32AnsiStdinclass. This can be used on Windows to get
a stdin stream that forwards arrow keys and other special keys in the way
that you'd expect, and converts then to ANSI escape sequences.- Note that this is not a full implementation, and only handles the events
that are needed for the CLI components in this package.
- Note that this is not a full implementation, and only handles the events
- Increases min SDK constraint to
^3.7.0.
- Add
-
0.5.012 May 2013Release notes
Open source →- Add
BaseDirectoriesclass and deprecateapplicationConfigHome. - Removed unused
package:metadependency. - Require Dart 3.4.
- Add
-
0.4.021 Feb 2013Nothing published for this version
-
0.3.620 Feb 2013Nothing published for this version
-
0.3.519 Feb 2013Nothing published for this version
-
0.3.419 Feb 2013Nothing published for this version