1859 Commits

Author SHA1 Message Date
Alexandre Mutel
56e9c23858 Use NuGet Trusted Publishing via dotnet-releaser 1.4.0 2026-09-20 09:52:24 +02:00
Alexandre Mutel
c6b186b4ce Bump deps 2026-09-20 09:46:49 +02:00
Alexandre Mutel
96b024c2d6 Fix tests warnings 2026-09-20 09:46:41 +02:00
Benny Tordrup
237ef72a0f Reject emoji-parsing if the slice ends with ** (#947)
* Reject emoji-parsing if the slice ends with `**`

* Still some emoji false positives

* Cleanup and reduced the number of emojis checked.

* Review comment resolved

* Fix emoji and emphasis precedence (#946)

Resolve trailing emphasis delimiters before converting ambiguous emoji matches. Reuse the existing emphasis parser rather than guessing whether an opener remains active or rejecting only double asterisks.

Cover italics, strong/nested emphasis, custom delimiters, links, images, tables, source positions, renderers, all default mappings, and 2688 emphasis-structure comparisons. Document emphasis and generic-attribute precedence and the named-shortcode escape hatch.

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-20 09:36:57 +02:00
Alexandre Mutel
86866b919c Fix strict GFM tables against native cmark-gfm 2026-09-19 15:20:49 +02:00
Alexandre Mutel
14cd25c744 Add strict GFM pipe table parsing mode 2026-09-19 12:58:58 +02:00
Liangying.Wei
ad7cc00ac3 Fix partially empty pipe table separator regression (#955)
* Fix partially empty pipe table separator regression

Restore historical acceptance of empty separator cells while retaining the row-wide dash requirement introduced for #927. Cover partial and entirely empty rows, alignment, optional pipes, and inferred widths.

Refs: dotnet/docfx#11147

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

* Fix normalization of empty inferred table separators (#955)

---------

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 12:42:55 +02:00
boxofyellow
6168275c3f Add Normalization Support for PipeTables (GFM) (#954)
* Add Support for PipeTables (GFM)

* Add additional tests. First two work, later three do not.

* Fix bad merge

* Update to follow style

* Address problem with trailing new lines after the table

* Fix pipe table normalization alignment and separators (#954)

---------

Co-authored-by: T. Thiery <thomas.thiery+git@gmail.com>
Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 12:24:10 +02:00
boxofyellow
209b347ac2 Fix indent on first list item (#482) (#953)
* Fix indent on first list item (#482)

* Fix normalization of empty quotes in list items (#953)

* Fix null validation for line-specific indents (#953)

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 12:09:15 +02:00
Michał "DualFroz" Fox
27b8c9eb56 Fix: keep trailing content out of an unmatched emphasis closer (#743) (#950)
* fix: keep trailing content out of unmatched emphasis closer (#743)

When EnableTrackTrivia() is enabled, an emphasis closer whose delimiter
run is only partially consumed (its leftover dropping below the minimum
count) kept the inlines that follow it nested inside the emphasis. The
roundtrip renderer then emitted the closing delimiters after that
trailing content, corrupting the output, for example a grid table
separator row using the "marked" (==) delimiter from EmphasisExtras.

Move the trailing content out to the outermost enclosing emphasis when
the closer can no longer be matched, mirroring the existing handling for
a fully consumed opener. The leftover closer keeps its position, so
cases without trailing content are unaffected. Adds a regression test.

* Fix unmatched emphasis closer cleanup order (#743)

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 11:52:40 +02:00
Michał "DualFroz" Fox
baa95a9ca3 Fix heading auto-link hijacking nested link labels (#668) (#949)
* Fix heading auto-link hijacking nested link labels (#668)

* Refactor heading reference resolution to init-only state (#949)

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
2026-09-19 11:41:48 +02:00
Nicolas Musset
b07b98e1b7 Update 3rd party extensions (#945)
Remove markdig.wpf which is archived and obsolete.
Add MarkView.Avalonia
2026-08-18 18:02:42 +02:00
Alexandre Mutel
fc705234fa Fix emoji table alignment regression (#943) 1.3.2 2026-06-18 18:49:25 +02:00
Alexandre Mutel
25506f20d9 Fix plus superscript parsing (#791) 1.3.1 2026-06-17 08:35:40 +02:00
Alexandre Mutel
50061841a4 Fix LinkHelper non-ASCII urilize (#942) 2026-06-17 08:25:56 +02:00
Alexandre Mutel
bc4e399087 Fix blockquote ordered list parsing (#887) 1.3.0 2026-06-13 14:38:30 +02:00
Alexandre Mutel
9dffce52b6 Fix NormalizeRenderer auto identifiers output (#930) 2026-06-13 14:21:54 +02:00
Alexandre Mutel
d7f13b03cf Fix configurable nesting depth limit (#892) 2026-06-13 14:20:14 +02:00
Alexandre Mutel
b83641351f Fix roundtrip autolink URLs (#919) 2026-06-13 14:03:45 +02:00
Alexandre Mutel
0f98267a85 Fix pipe table cells with unmatched subscript (#932) 2026-06-13 08:47:21 +02:00
Alexandre Mutel
fcbf817063 Fix CJK emphasis after HTML entity newlines (#941) 2026-06-13 08:12:54 +02:00
Alexandre Mutel
5dca4149a5 Update AGENTS.md 2026-06-13 08:12:54 +02:00
Andrew White
31c2baadd0 Update readme with Alert extension details (#940)
* Update readme with Alert extension details

* Update readme.md

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>

---------

Co-authored-by: Alexandre Mutel <alexandre_mutel@live.com>
Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
2026-06-04 07:48:11 +02:00
Simon Cropp
d72da576ea add InferColumnWidthsFromSeparator docs (#939) 2026-05-19 08:19:48 +02:00
Alexandre Mutel
be4da8b42d Remove old changelog.md 1.2.0 2026-05-12 08:06:25 +02:00
kapsiR
7dceff2130 Add opt-in support for nested alert blocks (#938)
Introduces AllowNestedAlerts on AlertExtension and AlertInlineParser
(default: false) to allow alert blocks inside blockquotes or list items.

The UseAlertBlocks() pipeline extension method exposes the new option
via an allowNestedAlerts parameter.

Resolves #853

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-07 23:13:34 +02:00
Simon Cropp
3d69933205 Attribute with StringSyntax (#937) 1.1.3 2026-04-20 08:11:09 +02:00
Nicolas Musset
5365879a23 Fix AbbreviationExtension corrupting emphasis/bold/italic resolution (#935) (#936)
* test: add failing regression tests for issue #935 (abbreviation + emphasis)

* fix: AbbreviationParser now substitutes post-inline-parse, fixes emphasis corruption (#935)

The PostMatch hook approach (running mid-parse) produced a ContainerInline
with IsClosed=false that disrupted FindLastContainer(), causing emphasis
delimiters to be appended as children of the abbreviation container instead
of as root siblings. It also had an off-by-one (i != 0 vs i != content.Start)
that caused abbreviations to be missed when the literal started inside emphasis.

Replace with a document.ProcessInlinesEnd handler that walks the fully resolved
inline tree (after EmphasisInlineParser and LinkInlineParser have run), inserting
AbbreviationInline/LiteralInline siblings directly into parent containers without
any wrapper ContainerInline.

Also update TestSourcePosition.TestAbbreviations to reflect the new tree shape
(no container wrapper; empty leading literals at word boundaries are pruned).

Fixes #935
2026-04-20 08:09:26 +02:00
prozolic
a9bd7c6a5e Fix to calculate LinkReferenceDefinition span positions from StringLineGroup.Lines (#931)
* Fix to calculate LinkReferenceDefinition span positions from StringLineGroup.Lines

* Add test case in TestMultilineInBlockquote

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

* Change from startPosition + span.End - span.Start to GetAbsolutePosition(lines, span.End)

* Move ConvertToAbsoluteSpan and GetAbsolutePosition to StringLineGroup

* Remove '\r' check in Write(ReadOnlySpan<char>)

---------

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
1.1.2
2026-03-24 21:21:12 +01:00
prozolic
7cb7583fd7 Fix emoji not rendering in table cells (#928)
* Fix emoji not rendering in table cells

* Update EmojiSpecs.md

* Update src/Markdig/Extensions/Emoji/EmojiParser.cs

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1.1.1
2026-03-04 21:20:18 +01:00
Alexandre Mutel
bddaa55da1 docs(site): document CJK friendly emphasis extension 1.1.0 2026-03-01 13:57:39 +01:00
Tatsunori Uchino
6d5a124863 Add CJK-friendly Emphasis Extension (#921)
* Add CJK-friendly Emphasis Extension

* Add auto-generated test file

* Add name for configuration

* Remove useless default value assignments

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>

* Make `CheckOpenCloseDelimiterCjkFriendly` internal only

* Remove `CjkFriendlyEmphasisExtension` class

* Add some comments including links

* Add direct tests on `CharHelper.CheckOpenCloseDelimiterCjkFriendly`

* Fix generated tests

* Add `#if NET`

* Skip Rune-dependent tests in .NET Standard tests

* Add missing XML Documentation Comments

* Fix URL

* Change test condition

* Add test in .NET Framework 4.8.1

* Add netstandard2.0 to SpecFileGen

* Add fallback for netstandard2.0

* Fix

* Revert "Fix"

This reverts commit 42e998b085.

* Revert "Add fallback for netstandard2.0"

This reverts commit 7400a7bb0b.

* Revert "Add netstandard2.0 to SpecFileGen"

This reverts commit f9aa8e1e8d.

* Revert "Add test in .NET Framework 4.8.1"

This reverts commit d8d6d516ed.

* Fix missing indent

---------

Co-authored-by: Miha Zupan <mihazupan.zupan1@gmail.com>
2026-03-01 13:47:54 +01:00
Alexandre Mutel
7959e3b912 Reject pipe-only rows as pipe table separators (Fixes #927) 1.0.1 2026-02-28 06:51:42 +01:00
Alexandre Mutel
391e03b8d0 Update readme 2026-02-22 19:17:58 +01:00
Alexandre Mutel
361231dc9e Fix ci 2026-02-22 14:46:24 +01:00
Alexandre Mutel
3167f8ef98 Add missing markdown example 2026-02-22 14:45:13 +01:00
Alexandre Mutel
682a30c1fe Add mermaid and katex 2026-02-22 14:11:54 +01:00
Alexandre Mutel
162c0d2264 Simplify NuGet description (#925) 1.0.0 2026-02-22 13:31:21 +01:00
Alexandre Mutel
f735314a77 Improve site documentation accuracy and structure 2026-02-22 10:49:31 +01:00
Alexandre Mutel
5de7e42a86 Add namespace API docs for Markdig 2026-02-22 10:21:13 +01:00
Miha Zupan
3fb74a0f2b Remove obsolete APIs (#926) 2026-02-22 08:15:07 +01:00
Alexandre Mutel
b370c5cca0 Update banner 2026-02-22 00:50:41 +01:00
Alexandre Mutel
d1ce188688 Add playground to frontpage 1.0.0-preview.1 2026-02-22 00:33:17 +01:00
Alexandre Mutel
999ccbc7c3 Fix top level readme about documentation 2026-02-21 23:58:48 +01:00
Alexandre Mutel
94cb00d19b Add GitHub action for site 2026-02-21 23:52:28 +01:00
Alexandre Mutel
74f429c427 Add comprehensive documentation site
Create a full Lunet-based documentation site in site/ with:
- Site config, navigation, landing page with hero section
- Core docs: getting started, usage guide, CommonMark reference
- Extension docs: 19 pages covering all 30+ extensions
- Developer guide: AST, pipeline, creating extensions, block/inline
  parsers, renderers, performance
- API reference generation via lunet-io/templates
- Remove obsolete parsing-*.md files (content revised into docs/)
- Update AGENTS.md with website build instructions
- Add site/AGENTS.md with site-specific guidance
2026-02-21 23:50:30 +01:00
Alexandre Mutel
020a8490dd Add DotSettings 2026-02-21 20:48:06 +01:00
Alexandre Mutel
310f084c9f Move doc to site 2026-02-21 20:47:59 +01:00
Alexandre Mutel
0cc463b6e1 Add XML docs for public Markdig API 2026-02-21 19:43:15 +01:00
Alexandre Mutel
148fd08b1d Add span validation/update APIs and tests 2026-02-21 19:17:18 +01:00