1847 Commits

Author SHA1 Message Date
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
Alexandre Mutel
c488a27497 Document parser authoring contracts and migration risks 2026-02-21 18:46:04 +01:00
Alexandre Mutel
58e8217ddb Add typed markdown object data key helpers 2026-02-21 18:46:04 +01:00
Alexandre Mutel
2c9a9a308c Add AST mutation helpers for block and inline trees 2026-02-21 18:46:04 +01:00
Alexandre Mutel
ab6204cf61 Add parser authoring helper APIs and tests 2026-02-21 18:46:04 +01:00
Alexandre Mutel
5e5112ccca Expose parser parity APIs for extension authors 2026-02-21 18:46:04 +01:00
Alexandre Mutel
e9d582a169 Update deps NuGet 2026-02-21 14:49:05 +01:00
Alexandre Mutel
e5c88eff00 Move from net9.0 to net10.0 2026-02-21 14:49:05 +01:00
Alexandre Mutel
1a96addeba Add api authoring 1.0 2026-02-21 14:17:43 +01:00
Alexandre Mutel
3f7c09c443 Add instructions 2026-02-21 09:52:46 +01:00
Martijn Laarman
d47fbc757f Optimize PipeTable parsing: O(n²) → O(n) for 3.7x–85x speedup, enables 10K+ row tables (#922)
* Optimize PipeTable parsing: O(n²) → O(n) for large tables

Pipe tables were creating deeply nested tree structures where each pipe
delimiter contained all subsequent content as children, causing O(n²)
traversal complexity for n cells. This change restructures the parser to
use a flat sibling-based structure, treating tables as matrices rather
than nested trees.

Key changes:
- Set IsClosed=true on PipeTableDelimiterInline to prevent nesting
- Add PromoteNestedPipesToRootLevel() to flatten pipes nested in emphasis
- Update cell boundary detection to use sibling traversal
- Move EmphasisInlineParser before PipeTableParser in processing order
- Fix EmphasisInlineParser to continue past IsClosed delimiters
- Add ContainsParentOrSiblingOfType<T>() helper for flat structure detection

Performance improvements (measured on typical markdown content):

| Rows | Before    | After   | Speedup |
|------|-----------|---------|---------|
| 100  | 542 μs    | 150 μs  | 3.6x    |
| 500  | 23,018 μs | 763 μs  | 30x     |
| 1000 | 89,418 μs | 1,596 μs| 56x     |
| 1500 | 201,593 μs| 2,740 μs| 74x     |
| 5000 | CRASH     | 10,588 μs| ∞      |
| 10000| CRASH     | 18,551 μs| ∞      |

Tables with 5000+ rows previously crashed due to stack overflow from
recursive depth. They now parse successfully with linear time complexity.

* remove baseline results file

* Do not use System.Index and fix nullabillity checks for older platforms
0.45.0
2026-01-30 22:05:18 +01:00
prozolic
3602433b84 Replace null checks with IsEmpty property for ReadOnlySpan<char> (#916)
This change suppresses CA2265 warnings.
2026-01-30 22:01:50 +01:00
prozolic
1bac4afc9b Use Dictionary.TryAdd instead of ContainsKey and indexer by reducing lookups. (#917)
* Use Dictionary.TryAdd instead of ContainsKey and indexer by reducing lookups.

* Update src/Markdig/Parsers/ParserList.cs

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

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-30 22:01:27 +01:00