Full Code of whistyun/Markdown.Avalonia for AI

master d71a34d8de3c cached
422 files
1.3 MB
337.4k tokens
1240 symbols
1 requests
Download .txt
Showing preview only (1,422K chars total). Download the full file or copy to clipboard to get everything.
Repository: whistyun/Markdown.Avalonia
Branch: master
Commit: d71a34d8de3c
Files: 422
Total size: 1.3 MB

Directory structure:
gitextract_t8vp1hh_/

├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── ColorDocument.Avalonia/
│   ├── ClassNames.cs
│   ├── ColorDocument.Avalonia.csproj
│   ├── DocumentElement.cs
│   ├── DocumentElements/
│   │   ├── BlockquoteElement.cs
│   │   ├── CTextBlockElement.cs
│   │   ├── DocumentRootElement.cs
│   │   ├── HeaderElement.cs
│   │   ├── ListBlockElement.cs
│   │   ├── ListItemElement.cs
│   │   ├── NoteBlockElement.cs
│   │   ├── PlainCodeBlockElement.cs
│   │   ├── TableBlockElement.cs
│   │   ├── TableCellElement.cs
│   │   ├── TextBlockElement.cs
│   │   ├── TextMarkerStyle.cs
│   │   └── UnBlockElement.cs
│   ├── EnumerableExt.cs
│   ├── NumberToOrder.cs
│   ├── RegionUtil.cs
│   ├── SelectionList.cs
│   └── SelectionUtil.cs
├── ColorTextBlock.Avalonia/
│   ├── CBold.cs
│   ├── CCode.cs
│   ├── CHyperlink.cs
│   ├── CImage.cs
│   ├── CInline.cs
│   ├── CInlineUIContainer.cs
│   ├── CItalic.cs
│   ├── CLineBreak.cs
│   ├── CRun.cs
│   ├── CSpan.cs
│   ├── CStrikethrough.cs
│   ├── CTextBlock.cs
│   ├── CTextBlockAutomationPeer.cs
│   ├── CUnderline.cs
│   ├── ColorTextBlock.Avalonia.csproj
│   ├── Fonts/
│   │   └── FontFamilyCollector.cs
│   ├── Geometies/
│   │   ├── CGeometry.cs
│   │   ├── DecoratorGeometry.cs
│   │   ├── DummyGeometryForControl.cs
│   │   ├── ImageGeometry.cs
│   │   ├── LineBreakMarkGeometry.cs
│   │   ├── TextGeometry.cs
│   │   └── TextLineGeometry.cs
│   ├── StringToRunConverter.cs
│   ├── TextPointer.cs
│   └── TextVerticalAlignment.cs
├── LICENSE.txt
├── Markdown.Avalonia/
│   ├── Markdown.Avalonia.csproj
│   ├── MarkdownScrollViewer.cs
│   ├── MdAvPlugins.cs
│   └── Properties/
│       └── AssemblyInfo.cs
├── Markdown.Avalonia.Html/
│   ├── Core/
│   │   ├── Parsers/
│   │   │   ├── ButtonParser.cs
│   │   │   ├── CodeBlockParser.cs
│   │   │   ├── CommentParser.cs
│   │   │   ├── DetailsParser.cs
│   │   │   ├── HorizontalRuleParser.cs
│   │   │   ├── ITagParser.cs
│   │   │   ├── ImageParser.cs
│   │   │   ├── InputParser.cs
│   │   │   ├── OrderListParser.cs
│   │   │   ├── ProgressParser.cs
│   │   │   ├── TagIgnoreParser.cs
│   │   │   ├── TextAreaParser.cs
│   │   │   ├── TextNodeParser.cs
│   │   │   ├── TypicalBlockParser.cs
│   │   │   ├── TypicalBlockParser.tsv
│   │   │   ├── TypicalInlineParser.cs
│   │   │   ├── TypicalInlineParser.tsv
│   │   │   ├── TypicalParseInfo.cs
│   │   │   └── UnorderListParser.cs
│   │   ├── Parsers.MarkdigExtensions/
│   │   │   ├── FigureParser.cs
│   │   │   └── GridTableParser.cs
│   │   ├── ReplaceManager.cs
│   │   ├── Tags.cs
│   │   ├── TextRange.cs
│   │   ├── UnknownTagException.cs
│   │   ├── UnknownTagsOption.cs
│   │   └── Utils/
│   │       ├── DocUtils.cs
│   │       ├── EnumerableExt.cs
│   │       ├── HtmlUtils.cs
│   │       ├── Length.cs
│   │       ├── NodeCollectionExt.cs
│   │       └── StringExt.cs
│   ├── HtmlBlockParser.cs
│   ├── HtmlInlineParser.cs
│   ├── HtmlPlugin.cs
│   ├── Markdown.Avalonia.Html.csproj
│   ├── SimpleHtmlUtils.cs
│   └── Tables/
│       ├── AutoScaleColumnDefinitions.cs
│       ├── Table.cs
│       └── TableCell.cs
├── Markdown.Avalonia.Svg/
│   ├── Markdown.Avalonia.Svg.csproj
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── SvgFormat.cs
│   ├── SvgImageResolver.cs
│   └── VectorImage.cs
├── Markdown.Avalonia.SyntaxHigh/
│   ├── Alias.cs
│   ├── CodeBlockElement.cs
│   ├── CodePad.cs
│   ├── Extensions/
│   │   ├── HSV.cs
│   │   ├── HighlightWrapper.cs
│   │   ├── MixHighlightingBrush.cs
│   │   └── SyntaxHighlightWrapperExtension.cs
│   ├── Markdown.Avalonia.SyntaxHigh.csproj
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── StyleCollections/
│   │   ├── AppendixOfDefaultTheme.axaml
│   │   ├── AppendixOfDefaultTheme.axaml.cs
│   │   ├── AppendixOfFluentAvalonia.axaml
│   │   ├── AppendixOfFluentAvalonia.axaml.cs
│   │   ├── AppendixOfFluentTheme.axaml
│   │   └── AppendixOfFluentTheme.axaml.cs
│   ├── StyleEdit.cs
│   ├── SyntaxHighlightProvider.cs
│   ├── SyntaxHiglight.cs
│   ├── SyntaxOverride.cs
│   └── ThemeDetector.cs
├── Markdown.Avalonia.Tight/
│   ├── CascadeDictionary.cs
│   ├── ChatAISetup.cs
│   ├── ContainerSwitcher.cs
│   ├── Controls/
│   │   ├── AutoScaleColumnDefinitions.cs
│   │   └── Rule.cs
│   ├── CopyMode.cs
│   ├── EmojiTable.cs
│   ├── EmojiTable.txt
│   ├── EngineUpg.cs
│   ├── Extensions/
│   │   ├── AlphaExtension.cs
│   │   ├── ComplementaryExtension.cs
│   │   ├── DivideColorExtension.cs
│   │   └── MultiplyExtension.cs
│   ├── Header.cs
│   ├── HeaderScrolled.cs
│   ├── HeaderScrolledEventArgs.cs
│   ├── IMarkdownEngine.cs
│   ├── IMarkdownEngine2.cs
│   ├── IMarkdownEngineBase.cs
│   ├── Markdown.Avalonia.Tight.csproj
│   ├── Markdown.cs
│   ├── MarkdownScrollViewer.cs
│   ├── MarkdownStyle.cs
│   ├── MdAvPlugins.cs
│   ├── Parsers/
│   │   ├── BlockParser.cs
│   │   ├── BlockParser2.cs
│   │   ├── BlockParserExt.cs
│   │   ├── Builtin/
│   │   │   ├── AbstractHeaderParser.cs
│   │   │   ├── AbstractHorizontalParser.cs
│   │   │   ├── AbstractListParser.cs
│   │   │   ├── AtxHeaderParser.cs
│   │   │   ├── BlockquotesParser.cs
│   │   │   ├── CommonHorizontalParser.cs
│   │   │   ├── CommonListParser.cs
│   │   │   ├── ContainerBlockParser.cs
│   │   │   ├── ExtHorizontalParser.cs
│   │   │   ├── ExtListParser.cs
│   │   │   ├── FencedCodeBlockParser.cs
│   │   │   ├── IndentCodeBlockParser.cs
│   │   │   ├── NoteParser.cs
│   │   │   ├── SetextHeaderParser.cs
│   │   │   └── TableParser.cs
│   │   ├── InlineParser.cs
│   │   └── ParseStatus.cs
│   ├── Plugins/
│   │   ├── BlockOverride2.cs
│   │   ├── IBlockOverrider.cs
│   │   ├── IMdAvPlugin.cs
│   │   ├── IStyleEditor.cs
│   │   └── SetupInfo.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── StyleCollections/
│   │   ├── INamedStyle.cs
│   │   ├── MarkdownStyleDefaultTheme.axaml
│   │   ├── MarkdownStyleDefaultTheme.axaml.cs
│   │   ├── MarkdownStyleFluentAvalonia.axaml
│   │   ├── MarkdownStyleFluentAvalonia.axaml.cs
│   │   ├── MarkdownStyleFluentTheme.axaml
│   │   ├── MarkdownStyleFluentTheme.axaml.cs
│   │   ├── MarkdownStyleGithubLike.axaml
│   │   ├── MarkdownStyleGithubLike.axaml.cs
│   │   ├── MarkdownStyleStandard.axaml
│   │   └── MarkdownStyleStandard.axaml.cs
│   ├── Tables/
│   │   ├── ITable.cs
│   │   ├── ITableCell.cs
│   │   ├── TextileTable.cs
│   │   └── TextileTableCell.cs
│   ├── TextMarkerStyle.cs
│   └── Utils/
│       ├── DefaultBitmapLoader.cs
│       ├── DefaultHyperlinkCommand.cs
│       ├── DefaultPathResolver.cs
│       ├── Helper.cs
│       ├── IBitmapLoader.cs
│       ├── IContainerBlockHandler.cs
│       ├── IImageResolver.cs
│       ├── IPathResolver.cs
│       ├── InterassemblyUtil.cs
│       ├── TextUtil.cs
│       └── ThemeDetector.cs
├── Markdown.Avalonia.props
├── Markdown.Avalonia.sln
├── Packages.ps1
├── README.md
├── benchmark/
│   └── MdAvBench/
│       ├── Apps/
│       │   ├── App.axaml
│       │   └── App.axaml.cs
│       ├── BenchmarkOfCTextBlock.cs
│       ├── MdAvBench.csproj
│       ├── Program.cs
│       ├── StringLogger.cs
│       └── Xamls/
│           ├── CTextBlockData.axaml
│           ├── CTextBlockData.axaml.cs
│           ├── TextBlockData.axaml
│           └── TextBlockData.axaml.cs
├── demos/
│   ├── Markdown.AvaloniaDemo/
│   │   ├── App.axaml
│   │   ├── App.axaml.cs
│   │   ├── Assets/
│   │   │   ├── AppendingStyles.axaml
│   │   │   ├── Pegasus-Mode.xshd
│   │   │   └── XamlTemplate.txt
│   │   ├── DynamicStyleBehavior.cs
│   │   ├── MainWindow.md
│   │   ├── Markdown.AvaloniaDemo.csproj
│   │   ├── MyConverter.cs
│   │   ├── Program.cs
│   │   ├── ViewLocator.cs
│   │   ├── ViewModels/
│   │   │   ├── MainWindowViewModel.cs
│   │   │   └── ViewModelBase.cs
│   │   ├── Views/
│   │   │   ├── MainWindow.axaml
│   │   │   └── MainWindow.axaml.cs
│   │   └── nuget.config
│   ├── Markdown.AvaloniaFluentAvaloniaDemo/
│   │   ├── App.axaml
│   │   ├── App.axaml.cs
│   │   ├── Assets/
│   │   │   ├── AppendingStyles.axaml
│   │   │   └── XamlTemplate.txt
│   │   ├── Assets2/
│   │   │   └── MainWindow.md
│   │   ├── DynamicStyleBehavior.cs
│   │   ├── MainWindow.md
│   │   ├── Markdown.AvaloniaFluentAvaloniaDemo.csproj
│   │   ├── MyConverter.cs
│   │   ├── Program.cs
│   │   ├── ViewLocator.cs
│   │   ├── ViewModels/
│   │   │   ├── MainWindowViewModel.cs
│   │   │   └── ViewModelBase.cs
│   │   ├── Views/
│   │   │   ├── MainWindow.axaml
│   │   │   └── MainWindow.axaml.cs
│   │   └── nuget.config
│   └── Markdown.AvaloniaFluentDemo/
│       ├── App.axaml
│       ├── App.axaml.cs
│       ├── Assets/
│       │   ├── AppendingStyles.axaml
│       │   └── XamlTemplate.txt
│       ├── Assets2/
│       │   └── MainWindow.md
│       ├── DynamicStyleBehavior.cs
│       ├── MainWindow.md
│       ├── Markdown.AvaloniaFluentDemo.csproj
│       ├── MyConverter.cs
│       ├── Program.cs
│       ├── ViewLocator.cs
│       ├── ViewModels/
│       │   ├── MainWindowViewModel.cs
│       │   └── ViewModelBase.cs
│       ├── Views/
│       │   ├── MainWindow.axaml
│       │   └── MainWindow.axaml.cs
│       └── nuget.config
├── example/
│   ├── CustomStyle/
│   │   ├── CustomStyle/
│   │   │   ├── App.axaml
│   │   │   ├── App.axaml.cs
│   │   │   ├── CustomStyle.csproj
│   │   │   ├── MainWindow.axaml
│   │   │   ├── MainWindow.axaml.cs
│   │   │   ├── Program.cs
│   │   │   ├── SetStyles.axaml
│   │   │   ├── SetStyles.axaml.cs
│   │   │   ├── UseEmbeddedStyle.axaml
│   │   │   ├── UseEmbeddedStyle.axaml.cs
│   │   │   └── nuget.config
│   │   └── CustomStyle.sln
│   └── HowToUse/
│       ├── HowToUse/
│       │   ├── App.axaml
│       │   ├── App.axaml.cs
│       │   ├── HowToUse.csproj
│       │   ├── MainWindow.axaml
│       │   ├── MainWindow.axaml.cs
│       │   ├── Program.cs
│       │   ├── UseBinding.axaml
│       │   ├── UseBinding.axaml.cs
│       │   ├── UseBindingViewModel.cs
│       │   ├── WriteMarkdownInXaml.axaml
│       │   ├── WriteMarkdownInXaml.axaml.cs
│       │   └── nuget.config
│       └── HowToUse.sln
├── key.snk
├── pack_readme/
│   ├── Markdown.Avalonia.Html.md
│   ├── Markdown.Avalonia.Svg.md
│   ├── Markdown.Avalonia.SyntaxHigh.md
│   ├── Markdown.Avalonia.Tight.md
│   └── Markdown.Avalonia.md
├── packs/
│   ├── ColorTextBlock.Avalonia.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.Html.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.Svg.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.SyntaxHigh.11.0.0-d2.nupkg
│   └── Markdown.Avalonia.Tight.11.0.0-d2.nupkg
└── tests/
    ├── UnitTest.Base/
    │   ├── Apps/
    │   │   ├── App.axaml
    │   │   └── App.axaml.cs
    │   ├── ChangeOutputPathNamer.cs
    │   ├── UnitTest.Base.csproj
    │   ├── UnitTestBase.cs
    │   └── Utils/
    │       ├── BrokenXamlWriter.cs
    │       ├── RunOnUIAttribute.cs
    │       ├── TextUtil.cs
    │       └── Util.cs
    ├── UnitTest.CTxt/
    │   ├── .gitignore
    │   ├── Assets/
    │   │   └── Fonts/
    │   │       └── license.html
    │   ├── Texts/
    │   │   └── MainWindow.md
    │   ├── UnitTest.CTxt.csproj
    │   ├── UnitTestCTxt.cs
    │   ├── Utils/
    │   │   ├── ApprovalImageWriter.cs
    │   │   └── ImageFileApprover.cs
    │   └── Xamls/
    │       ├── Test1.axaml
    │       ├── Test1.axaml.cs
    │       ├── Test2.axaml
    │       ├── Test2.axaml.cs
    │       ├── Test3.axaml
    │       ├── Test3.axaml.cs
    │       ├── Test4.axaml
    │       ├── Test4.axaml.cs
    │       ├── Test5.axaml
    │       ├── Test5.axaml.cs
    │       ├── Test6.axaml
    │       ├── Test6.axaml.cs
    │       ├── Test7.axaml
    │       ├── Test7.axaml.cs
    │       ├── Test99.axaml
    │       └── Test99.axaml.cs
    ├── UnitTest.Md/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTestMd.Transform_givenBlockqoute_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenCodes_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenContainer_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenEmoji.approved.txt
    │   │   ├── UnitTestMd.Transform_givenHorizontalRules_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenImages_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLinksInline_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists3_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenMixing2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenMixing_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenTables1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenTest1_generatesExpectedResult.approved.txt
    │   │   └── UnitTestMd.Transform_givenTextStyles_generatesExpectedResult.approved.txt
    │   ├── Texts/
    │   │   ├── Blockquite.md
    │   │   ├── Codes.md
    │   │   ├── ContainerBlock.md
    │   │   ├── Emoji.md
    │   │   ├── HorizontalRules.md
    │   │   ├── Images.md
    │   │   ├── Links_inline_style.md
    │   │   ├── Lists1.md
    │   │   ├── Lists2.md
    │   │   ├── Lists3.md
    │   │   ├── Mixing.md
    │   │   ├── Mixing2.md
    │   │   ├── Tables.md
    │   │   ├── Test1.md
    │   │   └── Text_style.md
    │   ├── UnitTest.Md.csproj
    │   └── UnitTestMd.cs
    ├── UnitTest.MdHtml/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTest.Button.approved.txt
    │   │   ├── UnitTest.CodeBlock.approved.txt
    │   │   ├── UnitTest.Details.approved.txt
    │   │   ├── UnitTest.InlineCode.approved.txt
    │   │   ├── UnitTest.Input.approved.txt
    │   │   ├── UnitTest.List.approved.txt
    │   │   ├── UnitTest.Mixing.approved.txt
    │   │   ├── UnitTest.Progres.approved.txt
    │   │   ├── UnitTest.Table.approved.txt
    │   │   ├── UnitTest.TypicalBlock.approved.txt
    │   │   └── UnitTest.TypicalInline.approved.txt
    │   ├── Texts/
    │   │   ├── Button.html
    │   │   ├── CodeBlock.html
    │   │   ├── Details.html
    │   │   ├── InlineCode.html
    │   │   ├── Input.html
    │   │   ├── List.html
    │   │   ├── Mixing.html
    │   │   ├── Progres.html
    │   │   ├── Table.html
    │   │   ├── TypicalBlock.html
    │   │   └── TypicalInline.html
    │   ├── UnitTest.MdHtml.csproj
    │   ├── UnitTest.cs
    │   └── Utils.cs
    ├── UnitTest.MdSyntax/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTestMdSyntax.Transform_givenBlockqoute_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenCodes_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenContainer_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenEmoji.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenHorizontalRules_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenImages_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLinksInline_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists3_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenMixing2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenMixing_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenTables1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenTest1_generatesExpectedResult.approved.txt
    │   │   └── UnitTestMdSyntax.Transform_givenTextStyles_generatesExpectedResult.approved.txt
    │   ├── Texts/
    │   │   ├── Blockquite.md
    │   │   ├── Codes.md
    │   │   ├── ContainerBlock.md
    │   │   ├── Emoji.md
    │   │   ├── HorizontalRules.md
    │   │   ├── Images.md
    │   │   ├── Links_inline_style.md
    │   │   ├── Lists1.md
    │   │   ├── Lists2.md
    │   │   ├── Lists3.md
    │   │   ├── Mixing.md
    │   │   ├── Mixing2.md
    │   │   ├── Tables.md
    │   │   ├── Test1.md
    │   │   └── Text_style.md
    │   ├── UnitTest.MdSyntax.csproj
    │   ├── UnitTestConverter.cs
    │   └── UnitTestMdSyntax.cs
    └── UnitTest.props

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitattributes
================================================
# Auto detect text files and perform LF normalization
* text=auto

# Custom for Visual Studio
*.cs     diff=csharp
*.sln    merge=union
*.csproj merge=union
*.vbproj merge=union
*.fsproj merge=union
*.dbproj merge=union

# Standard to msysgit
*.doc	 diff=astextplain
*.DOC	 diff=astextplain
*.docx diff=astextplain
*.DOCX diff=astextplain
*.dot  diff=astextplain
*.DOT  diff=astextplain
*.pdf  diff=astextplain
*.PDF	 diff=astextplain
*.rtf	 diff=astextplain
*.RTF	 diff=astextplain


================================================
FILE: .github/workflows/build.yml
================================================
name: .NET

on:
  pull_request:
    branches: [ master ]
  workflow_dispatch:

jobs:
  build:
    runs-on: windows-latest

    strategy:
      matrix:
        versions: [ 12.0.0, 12.0.1 ]

    steps:
    - uses: actions/checkout@v2
      with:
          submodules: 'true'
    - name: Clean
      run: dotnet clean
      env:
        AVA_VER: ${{ matrix.versions }}
    - name: Restore
      run: dotnet restore
      env:
        AVA_VER: ${{ matrix.versions }}
    - name: Build
      run: dotnet build --no-restore
      env:
        AVA_VER: ${{ matrix.versions }}
    - name: Test
      run: dotnet test --no-build --verbosity normal
      env:
        AVA_VER: ${{ matrix.versions }}


================================================
FILE: .gitignore
================================================
#################
## Eclipse
#################

*.pydevproject
.project
.metadata
bin/
tmp/
*.tmp
*.bak
*.swp
*~.nib
local.properties
.classpath
.settings/
.loadpath

# External tool builders
.externalToolBuilders/

# Locally stored "Eclipse launch configurations"
*.launch

# CDT-specific
.cproject

# PDT-specific
.buildpath


#################
## Visual Studio
#################

## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.

.vs
packages

# User-specific files
*.suo
*.user
*.sln.docstates

# Build results
[Dd]ebug/
[Rr]elease/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.vspscc
.builds
*.dotCover

## TODO: If you have NuGet Package Restore enabled, uncomment this
#packages/

# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf

# Visual Studio profiler
*.psess
*.vsp

# ReSharper is a .NET coding add-in
_ReSharper*

# Installshield output folder
[Ee]xpress

# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html

# Click-Once directory
publish

# Others
[Bb]in
[Oo]bj
sql
TestResults
*.Cache
ClientBin
stylecop.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects

# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML



############
## Windows
############

# Windows image file caches
Thumbs.db

# Folder config file
Desktop.ini


#############
## Python
#############

*.py[co]

# Packages
*.egg
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg

# Installer logs
pip-log.txt

# Unit test / coverage reports
.coverage
.tox

#Translations
*.mo

#Mr Developer
.mr.developer.cfg

# Mac crap
.DS_Store

================================================
FILE: ColorDocument.Avalonia/ClassNames.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ColorDocument.Avalonia
{
    public static class ClassNames
    {
        public const string Heading1Class = "Heading1";
        public const string Heading2Class = "Heading2";
        public const string Heading3Class = "Heading3";
        public const string Heading4Class = "Heading4";
        public const string Heading5Class = "Heading5";
        public const string Heading6Class = "Heading6";

        public const string CodeBlockClass = "CodeBlock";
        public const string ContainerBlockClass = "ContainerBlock";
        public const string NoContainerClass = "NoContainer";
        public const string BlockquoteClass = "Blockquote";
        public const string NoteClass = "Note";

        public const string ParagraphClass = "Paragraph";

        public const string TableClass = "Table";
        public const string TableHeaderClass = "TableHeader";
        public const string TableFirstRowClass = "FirstTableRow";
        public const string TableRowOddClass = "OddTableRow";
        public const string TableRowEvenClass = "EvenTableRow";
        public const string TableLastRowClass = "LastTableRow";
        public const string TableFooterClass = "TableFooter";

        public const string ListClass = "List";
        public const string ListMarkerClass = "ListMarker";
    }
}


================================================
FILE: ColorDocument.Avalonia/ColorDocument.Avalonia.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\Markdown.Avalonia.props" />

  <PropertyGroup>
    <TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
    <Version>$(PackageVersion)</Version>
    <Authors>Bevan Arps(original); whistyun</Authors>
    <PackageId>ColorDocument.Avalonia</PackageId>

    <Version>$(PackageVersion)</Version>
    <Authors>whistyun</Authors>
    <Copyright>Copyright (c) 2024 whistyun</Copyright>
    <PackageProjectUrl>https://github.com/whistyun/Markdown.Avalonia/tree/master/ColorDocument.Avalonia/</PackageProjectUrl>
    <LangVersion>9</LangVersion>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\ColorTextBlock.Avalonia\ColorTextBlock.Avalonia.csproj" />
  </ItemGroup>
</Project>


================================================
FILE: ColorDocument.Avalonia/DocumentElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia
{
    public abstract class DocumentElement
    {
        private ISelectionRenderHelper? _helper;

        public abstract Control Control { get; }
        public abstract IEnumerable<DocumentElement> Children { get; }

        public ISelectionRenderHelper? Helper
        {
            get => _helper;
            set
            {
                _helper = value;
                foreach (var child in Children)
                    child.Helper = value;
            }
        }

        public Rect GetRect(Layoutable anchor) => Control.GetRectInDoc(anchor).GetValueOrDefault();
        public abstract void Select(Point from, Point to);
        public abstract void UnSelect();

        public virtual string GetSelectedText()
        {
            var builder = new StringBuilder();
            ConstructSelectedText(builder);
            return builder.ToString();
        }

        public abstract void ConstructSelectedText(StringBuilder stringBuilder);

    }

    public interface ISelectionRenderHelper
    {
        void Register(Control control);
        void Unregister(Control control);
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/BlockquoteElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    /// <summary>
    /// The document element for expression of blockquote.
    /// </summary>
    // 引用を表現するためのドキュメント要素
    public class BlockquoteElement : DocumentElement
    {
        private Lazy<Border> _block;
        private EnumerableEx<DocumentElement> _children;
        private SelectionList? _prevSelection;

        public override Control Control => _block.Value;
        public override IEnumerable<DocumentElement> Children => _children;

        public BlockquoteElement(IEnumerable<DocumentElement> child)
        {
            _block = new Lazy<Border>(Create);
            _children = child.ToEnumerable();
        }

        private Border Create()
        {
            var panel = new StackPanel();
            panel.Orientation = Orientation.Vertical;
            panel.Classes.Add(ClassNames.BlockquoteClass);
            foreach (var child in Children)
                panel.Children.Add(child.Control);

            var border = new Border();
            border.Classes.Add(ClassNames.BlockquoteClass);
            border.Child = panel;

            return border;
        }

        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectVertical(Control, _children, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var child in _children)
                child.UnSelect();
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            var preLen = builder.Length;

            foreach (var para in _prevSelection)
            {
                para.ConstructSelectedText(builder);

                if (preLen == builder.Length)
                    continue;

                if (builder[builder.Length - 1] != '\n')
                    builder.Append('\n');
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/CTextBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using ColorTextBlock.Avalonia;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class CTextBlockElement : DocumentElement
    {
        private Lazy<CTextBlock> _text;

        public string Text => _text.Value.Text;

        public override Control Control => _text.Value;

        public override IEnumerable<DocumentElement> Children => Array.Empty<DocumentElement>();

        public CTextBlockElement(IEnumerable<CInline> inlines)
        {
            _text = new Lazy<CTextBlock>(() =>
            {
                var text = new CTextBlock();
                foreach (var inline in inlines)
                    text.Content.Add(inline);
                return text;
            });
        }
        public CTextBlockElement(IEnumerable<CInline> inlines, string appendClass)
        {
            _text = new Lazy<CTextBlock>(() =>
            {
                var text = new CTextBlock();
                foreach (var inline in inlines)
                    text.Content.Add(inline);

                text.Classes.Add(appendClass);
                return text;
            });
        }

        public CTextBlockElement(IEnumerable<CInline> inlines, string appendClass, TextAlignment alignment)
        {
            _text = new Lazy<CTextBlock>(() =>
            {
                var text = new CTextBlock();
                foreach (var inline in inlines)
                    text.Content.Add(inline);

                text.TextAlignment = alignment;
                text.Classes.Add(appendClass);
                return text;
            });
        }


        public override void Select(Point from, Point to)
        {
            var text = _text.Value;

            var fromPoint = text.CalcuatePointerFrom(from.X, from.Y);
            var toPoint = text.CalcuatePointerFrom(to.X, to.Y);
            text.Select(fromPoint, toPoint);
        }

        public override void UnSelect()
        {
            _text.Value.ClearSelection();
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            builder.Append(_text.Value.GetSelectedText());
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/DocumentRootElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    /// <summary>
    /// The top document element.
    /// </summary>
    public class DocumentRootElement : DocumentElement
    {
        private Lazy<StackPanel> _block;
        private EnumerableEx<DocumentElement> _children;
        private SelectionList? _prevSelection;

        public override Control Control => _block.Value;
        public override IEnumerable<DocumentElement> Children => _children;

        public DocumentRootElement(IEnumerable<DocumentElement> child)
        {
            _block = new Lazy<StackPanel>(Create);
            _children = child.ToEnumerable();
        }

        private StackPanel Create()
        {
            var panel = new StackPanel();
            panel.Orientation = Orientation.Vertical;
            foreach (var child in _children)
                panel.Children.Add(child.Control);

            return panel;
        }

        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectVertical(Control, _children, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var child in _children)
                child.UnSelect();
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            var preLen = builder.Length;

            foreach (var para in _prevSelection)
            {
                para.ConstructSelectedText(builder);

                if (preLen == builder.Length)
                    continue;

                if (builder[builder.Length - 1] != '\n')
                    builder.Append('\n');
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/HeaderElement.cs
================================================
using ColorTextBlock.Avalonia;
using System.Collections.Generic;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class HeaderElement : CTextBlockElement
    {
        public int Level { get; }

        public HeaderElement(IEnumerable<CInline> inlines, int level) :
            base(inlines, level switch
            {
                1 => ClassNames.Heading1Class,
                2 => ClassNames.Heading2Class,
                3 => ClassNames.Heading3Class,
                4 => ClassNames.Heading4Class,
                5 => ClassNames.Heading5Class,
                _ => ClassNames.Heading6Class,
            })
        {
            Level = level switch
            {
                1 => 1,
                2 => 2,
                3 => 3,
                4 => 4,
                5 => 5,
                _ => 6,
            };
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/ListBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using ColorTextBlock.Avalonia;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class ListBlockElement : DocumentElement
    {
        private Lazy<Grid> _control;
        private EnumerableEx<ListItemElement> _items;
        private SelectionList? _prevSelection;

        public override Control Control => _control.Value;
        public override IEnumerable<DocumentElement> Children => _items;

        public ListBlockElement(TextMarkerStyle marker, IEnumerable<ListItemElement> items)
        {
            _control = new Lazy<Grid>(() => CreateList(marker));
            _items = items.ToEnumerable();
        }

        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectVertical(Control, _items, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var c in _items)
                c.UnSelect();
        }

        private Grid CreateList(TextMarkerStyle marker)
        {
            var grid = new Grid();
            grid.Classes.Add(ClassNames.ListClass);
            grid.ColumnDefinitions.Add(new ColumnDefinition(GridLength.Auto));
            grid.ColumnDefinitions.Add(new ColumnDefinition());

            int index = 0;
            foreach (var item in _items)
            {
                var markerTxt = new CTextBlock(marker.CreateMakerText(index));
                var itemCtrl = item.Control;

                item.MarkerText = markerTxt.Text;

                // adjust baseline
                if (FindFirstFrom(itemCtrl) is { } controlTxt)
                    markerTxt.ObserveBaseHeightOf(controlTxt);

                grid.RowDefinitions.Add(new RowDefinition());

                markerTxt.TextAlignment = TextAlignment.Right;
                markerTxt.TextWrapping = TextWrapping.NoWrap;
                markerTxt.Classes.Add(ClassNames.ListMarkerClass);
                Grid.SetRow(markerTxt, index);
                Grid.SetColumn(markerTxt, 0);
                grid.Children.Add(markerTxt);

                Grid.SetRow(itemCtrl, index);
                Grid.SetColumn(itemCtrl, 1);
                grid.Children.Add(itemCtrl);

                ++index;
            }

            return grid;

            static CTextBlock? FindFirstFrom(Control ctrl)
            {
                if (ctrl is Panel pnl)
                {
                    foreach (var chld in pnl.Children)
                    {
                        var res = FindFirstFrom(chld);
                        if (res != null) return res;
                    }
                }
                if (ctrl is CTextBlock ctxt)
                {
                    return ctxt;
                }
                return null;
            }
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            foreach (var para in _prevSelection.Cast<ListItemElement>())
            {
                builder.Append(para.MarkerText).Append(' ');

                var listElmTxt = para.GetSelectedText().Replace("\r\n", "\n").Replace('\r', '\n');
                builder.Append(listElmTxt);

                if (!listElmTxt.EndsWith("\n"))
                    builder.Append('\n');
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/ListItemElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class ListItemElement : DocumentElement
    {
        private Lazy<StackPanel> _panel;
        private EnumerableEx<DocumentElement> _elements;
        private SelectionList? _prevSelection;

        internal string MarkerText { get; set; }

        public override Control Control => _panel.Value;
        public override IEnumerable<DocumentElement> Children => _elements;

        public ListItemElement(IEnumerable<DocumentElement> contents)
        {
            _elements = contents.ToEnumerable();
            _panel = new Lazy<StackPanel>(() =>
            {
                var panel = new StackPanel();
                foreach (var content in _elements)
                    panel.Children.Add(content.Control);

                return panel;
            });
        }


        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectVertical(Control, _elements, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var c in _elements)
                c.UnSelect();
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            var preLen = builder.Length;

            foreach (var para in _prevSelection)
            {
                para.ConstructSelectedText(builder);

                if (preLen == builder.Length)
                    continue;

                if (builder[builder.Length - 1] != '\n')
                    builder.Append('\n');
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/NoteBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using ColorTextBlock.Avalonia;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class NoteBlockElement : DocumentElement
    {
        private CTextBlockElement _child;
        private TextAlignment? _indiAlignment;
        private Lazy<Border> _block;

        public override Control Control => _block.Value;

        public override IEnumerable<DocumentElement> Children => new[] { _child };

        public NoteBlockElement(IEnumerable<CInline> content, TextAlignment? indiAlignment)
        {
            _child = new CTextBlockElement(content);
            _indiAlignment = indiAlignment;

            _block = new Lazy<Border>(Create);
        }

        private Border Create()
        {
            var note = (CTextBlock)_child.Control;

            note.Classes.Add(ClassNames.NoteClass);
            if (_indiAlignment.HasValue)
            {
                note.TextAlignment = _indiAlignment.Value;
            }

            var result = new Border();
            result.Classes.Add(ClassNames.NoteClass);
            result.Child = note;

            return result;
        }

        public override void Select(Point from, Point to)
            => _child.Select(from, to);

        public override void UnSelect()
        {
            _child.UnSelect();
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            _child.ConstructSelectedText(builder);
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/PlainCodeBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Primitives;
using Avalonia.Media;
using ColorTextBlock.Avalonia;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class PlainCodeBlockElement : DocumentElement
    {
        private string _code;
        private Lazy<Border> _border;

        public override Control Control => _border.Value;

        public override IEnumerable<DocumentElement> Children => Array.Empty<DocumentElement>();

        public PlainCodeBlockElement(string code)
        {
            _code = code;
            _border = new Lazy<Border>(CreateBlock);
        }

        public override void Select(Point from, Point to)
        {
        }

        public override void UnSelect()
        {
        }

        public Border CreateBlock()
        {
            var ctxt = new TextBlock()
            {
                Text = _code,
                TextWrapping = TextWrapping.NoWrap
            };
            ctxt.Classes.Add(ClassNames.CodeBlockClass);

            var scrl = new ScrollViewer();
            scrl.Classes.Add(ClassNames.CodeBlockClass);
            scrl.Content = ctxt;
            scrl.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto;

            var result = new Border();
            result.Classes.Add(ClassNames.CodeBlockClass);
            result.Child = scrl;

            return result;
        }

        public override void ConstructSelectedText(StringBuilder stringBuilder)
        {
            stringBuilder.Append(_code);
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/TableBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class TableBlockElement : DocumentElement
    {
        private Lazy<Border> _table;
        private TableCellElement[][] _head;
        private TableCellElement[][] _body;
        private TableCellElement[][] _foot;
        private bool _autoAdjust;
        private EnumerableEx<TableCellElement> _all;
        private SelectionList? _prevSelection;

        public override Control Control => _table.Value;
        public override IEnumerable<DocumentElement> Children => _all;

        public TableBlockElement(
            IEnumerable<IEnumerable<TableCellElement>> thead,
            IEnumerable<IEnumerable<TableCellElement>> tbody,
            IEnumerable<IEnumerable<TableCellElement>> tfoot,
            bool autoAdjust) :
                this(
                    thead.Select(ln => ln.ToArray()).ToArray(),
                    tbody.Select(ln => ln.ToArray()).ToArray(),
                    tfoot.Select(ln => ln.ToArray()).ToArray(),
                    autoAdjust)
        { }

        public TableBlockElement(
            TableCellElement[][] thead,
            TableCellElement[][] tbody,
            TableCellElement[][] tfoot,
            bool autoAdjust)
        {
            _head = thead;
            _body = tbody;
            _foot = tfoot;

            _all = _head.SelectMany(l => l)
                        .Concat(_body.SelectMany(l => l))
                        .Concat(_foot.SelectMany(l => l))
                        .ToEnumerable();

            _autoAdjust = autoAdjust;

            _table = new Lazy<Border>(CreateTable);
        }

        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectGrid(Control, _all, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var child in _all)
                child.UnSelect();
        }

        private Border CreateTable()
        {
            var rowInfs = new List<RowInf>();
            CreateRows(rowInfs, _head, ClassNames.TableHeaderClass);
            CreateRows(rowInfs, _body);
            CreateRows(rowInfs, _foot, ClassNames.TableFooterClass);

            int maxColCnt = rowInfs.Max(r => r.ColumnCount);

            if (_autoAdjust)
            {
                for (int i = 0; i < rowInfs.Count; ++i)
                {
                    var rowInf = rowInfs[i];
                    while (rowInf.ColumnCount < maxColCnt)
                    {
                        var cellCtrl = new Border();
                        Grid.SetRow(cellCtrl, i);
                        Grid.SetColumn(cellCtrl, rowInf.ColumnCount);
                        rowInf.Cells.Add(cellCtrl);
                        rowInf.ColumnCount++;
                    }
                }
            }

            var grid = new Grid();
            grid.Classes.Add(ClassNames.TableClass);

            grid.RowDefinitions.AddRange(Enumerable.Range(0, rowInfs.Count).Select(_ => new RowDefinition()));
            grid.ColumnDefinitions.AddRange(Enumerable.Range(0, maxColCnt).Select(_ => new ColumnDefinition()));

            foreach (var rowInf in rowInfs)
            {
                foreach (var cell in rowInf.Cells)
                    cell.Classes.AddRange(rowInf.Classes);

                grid.Children.AddRange(rowInf.Cells);
            }

            var border = new Border();
            border.Classes.Add(ClassNames.TableClass);
            border.Child = grid;

            //var grid = new Grid();
            //grid.Classes.Add(ClassNames.TableClass);
            //var border = new Border();
            //border.Classes.Add(ClassNames.TableClass);
            //border.Child = grid;
            //int rowOffset = 0;
            //
            //int hRowOffset = rowOffset;
            //List<RowInfo> hInfs = SetupRow(grid, _head, ref rowOffset, ClassNames.TableHeaderClass);
            //int bRowOffset = rowOffset;
            //List<RowInfo> bInfs = SetupRow(grid, _body, ref rowOffset);
            //int fRowOffset = rowOffset;
            //List<RowInfo> fInfs = SetupRow(grid, _foot, ref rowOffset, ClassNames.TableFooterClass);
            //
            //int colCnt = hInfs.Concat(bInfs).Concat(fInfs).Max(i => i.ColumnCount);
            //
            //if (_autoAdjust)
            //{
            //    AdjustRow(grid, hInfs, hRowOffset, colCnt);
            //    AdjustRow(grid, bInfs, bRowOffset, colCnt);
            //    AdjustRow(grid, fInfs, fRowOffset, colCnt);
            //}
            //
            //foreach (var _ in Enumerable.Range(0, colCnt))
            //{
            //    grid.ColumnDefinitions.Add(new ColumnDefinition());
            //}

            return border;
        }

        private static List<RowInfo> SetupRow(
            Grid grid,
            TableCellElement[][] rows,
            ref int gridRowIdx,
            string? classNm = null)
        {
            // The list of multi-row cells.
            // Key: Column index where the target cell is located.
            var multiRowsAtColIdx = new Dictionary<int, MdSpan>();

            var rowInfs = new List<RowInfo>();
            var maxColCount = 0;

            int startRowInSection = gridRowIdx;
            for (var i = 0; i < rows.Length; ++gridRowIdx)
            {
                var row = rows[i];
                grid.RowDefinitions.Add(new RowDefinition());

                // Set up classes for cell in this row.
                string[] classes;
                if (classNm is not null)
                    classes = new[] { classNm };
                else
                {
                    var rowIdxInSection = gridRowIdx - startRowInSection;

                    if (rowIdxInSection == 0)
                    {
                        if (i == rows.Length - 1)
                            classes = new[] { ClassNames.TableRowOddClass, ClassNames.TableFirstRowClass, ClassNames.TableLastRowClass };
                        else
                            classes = new[] { ClassNames.TableRowOddClass, ClassNames.TableFirstRowClass };
                    }
                    else
                    {
                        var oddOrEven = rowIdxInSection % 2 == 0 ? ClassNames.TableRowOddClass : ClassNames.TableRowEvenClass;

                        if (i == rows.Length - 1)
                            classes = new[] { oddOrEven, ClassNames.TableLastRowClass };
                        else
                            classes = new[] { oddOrEven };
                    }
                }


                var rowspansColOffset = multiRowsAtColIdx.Sum(e => e.Value.ColSpan);

                /*
                 * In this row, is space exists to insert cell?
                 * 
                 * eg. has space
                 *    __________________________________
                 *    | 2x1 cell | 1x1 cell | 1x1 cell |
                 * -> |          |‾‾‾‾‾‾‾‾‾‾|‾‾‾‾‾‾‾‾‾‾|
                 *    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
                 *    
                 * eg. has no space: multi-rows occupy all space in this row.
                 *    __________________________________
                 *    | 2x1 cell |      2x2 cell        |
                 * -> |          |                      |
                 *    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
                 * 
                 */
                if (rowspansColOffset == 0 || rowspansColOffset < maxColCount)
                {
                    int colIdx = 0;
                    foreach (var cell in row)
                    {
                        while (multiRowsAtColIdx.TryGetValue(colIdx, out var span))
                        {
                            colIdx += span.ColSpan;
                        }

                        var cellCtrl = cell.Control;
                        cell.Row = gridRowIdx;
                        cell.Column = colIdx;
                        Grid.SetRow(cellCtrl, gridRowIdx);
                        Grid.SetColumn(cellCtrl, colIdx);
                        if (cell.RowSpan > 1) Grid.SetRowSpan(cellCtrl, cell.RowSpan);
                        if (cell.ColSpan > 1) Grid.SetColumnSpan(cellCtrl, cell.ColSpan);
                        cellCtrl.Classes.AddRange(classes);
                        grid.Children.Add(cellCtrl);


                        if (cell.RowSpan > 1)
                        {
                            multiRowsAtColIdx[colIdx] =
                                new MdSpan(cell.RowSpan, cell.ColSpan);
                        }

                        colIdx += cell.ColSpan;
                    }

                    rowInfs.Add(new RowInfo(classes, colIdx));

                    if (maxColCount < colIdx) maxColCount = colIdx;

                    ++i;
                }
                else
                {
                    rowInfs.Add(new RowInfo(classes, rowspansColOffset));
                }

                // Removes multi-row cells,   複数行にまたがるセルの削除(必要なら)
                foreach (var spanEntry in multiRowsAtColIdx.ToArray())
                {
                    if (--spanEntry.Value.Life == 0)
                    {
                        multiRowsAtColIdx.Remove(spanEntry.Key);
                    }
                }
            }

            // if any multirow is left, insert an empty row.
            while (multiRowsAtColIdx.Count > 0)
            {
                grid.RowDefinitions.Add(new RowDefinition());

                var colOffset = 0;

                foreach (var spanEntry in multiRowsAtColIdx.OrderBy(tpl => tpl.Key))
                {
                    while (colOffset < spanEntry.Key)
                    {
                        var cellCtrl = new Border();
                        Grid.SetRow(cellCtrl, gridRowIdx);
                        Grid.SetColumn(cellCtrl, colOffset);
                        grid.Children.Add(cellCtrl);
                        colOffset++;

                    }
                    colOffset += spanEntry.Value.ColSpan;


                    if (--spanEntry.Value.Life == 0)
                    {
                        multiRowsAtColIdx.Remove(spanEntry.Key);
                    }
                }

                rowInfs.Add(new RowInfo(Array.Empty<string>(), colOffset));
                gridRowIdx++;
            }

            return rowInfs;
        }

        private static void AdjustRow(Grid grid, List<RowInfo> rowInfs, int rowOffset, int colCnt)
        {
            for (var rowIdx = 0; rowIdx < rowInfs.Count; ++rowIdx)
            {
                var rowInf = rowInfs[rowIdx];
                for (var colIdx = rowInf.ColumnCount; colIdx < colCnt; ++colIdx)
                {
                    var cellCtrl = new Border();
                    Grid.SetRow(cellCtrl, rowIdx + rowOffset);
                    Grid.SetColumn(cellCtrl, colIdx);
                    cellCtrl.Classes.AddRange(rowInf.Classes);
                    grid.Children.Insert(SearchInsPos(grid.Children, cellCtrl), cellCtrl);
                }
            }

            int SearchInsPos(IList<Control> list, Control tgt)
            {
                int min = 0, max = list.Count;

                var tgtRow = Grid.GetRow(tgt);
                var tgtCol = Grid.GetColumn(tgt);
                int mid = 0;

                while (min < max)
                {
                    mid = (min + max) / 2;

                    var ctrl = list[mid];
                    var ctrlRow = Grid.GetRow(ctrl);
                    var ctrlCol = Grid.GetColumn(ctrl);

                    if (tgtRow < ctrlRow || (tgtRow == ctrlRow && tgtCol < ctrlCol))
                    {
                        max = mid - 1;
                    }
                    else if (tgtRow > ctrlRow || (tgtRow == ctrlRow && tgtCol > ctrlCol))
                    {
                        min = mid + 1;
                    }
                    else break;
                }

                for (var i = Math.Min(Math.Min(Math.Min(min, max), mid), list.Count); i < list.Count; ++i)
                {
                    var ctrl = list[i];
                    var ctrlRow = Grid.GetRow(ctrl);
                    var ctrlCol = Grid.GetColumn(ctrl);

                    if (tgtRow < ctrlRow || (tgtRow == ctrlRow && tgtCol < ctrlCol))
                    {
                        return i;
                    }
                }

                return list.Count;
            }
        }


        private void CreateRows(List<RowInf> rowInfs, TableCellElement[][] rows, string? classNm = null)
        {
            // The list of multi-row cells.
            // Key: Column index where the target cell is located.
            var multiRowsAtColIdx = new Dictionary<int, MdSpan>();

            var maxColCount = 0;
            int detailsRowIdx = 0;
            for (int i = 0; i < rows.Length;)
            {
                var rinf = new RowInf();
                SetupClass(rinf, detailsRowIdx++, classNm);


                var rowspansColOffset = multiRowsAtColIdx.Sum(e => e.Value.ColSpan);
                /*
                 * In this row, is space exists to insert cell?
                 * 
                 * eg. has space
                 *    __________________________________
                 *    | 2x1 cell | 1x1 cell | 1x1 cell |
                 * -> |          |‾‾‾‾‾‾‾‾‾‾|‾‾‾‾‾‾‾‾‾‾|
                 *    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
                 *    
                 * eg. has no space: multi-rows occupy all space in this row.
                 *    __________________________________
                 *    | 2x1 cell |      2x2 cell        |
                 * -> |          |                      |
                 *    ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
                 * 
                 */
                if (rowspansColOffset == 0 || rowspansColOffset < maxColCount)
                {
                    int colIdx = 0;
                    foreach (var cell in rows[i])
                    {
                        while (multiRowsAtColIdx.TryGetValue(colIdx, out var span))
                        {
                            colIdx += span.ColSpan;
                        }

                        var cellCtrl = cell.Control;
                        cell.Row = rowInfs.Count;
                        cell.Column = colIdx;
                        Grid.SetRow(cellCtrl, rowInfs.Count);
                        Grid.SetColumn(cellCtrl, colIdx);
                        if (cell.RowSpan > 1) Grid.SetRowSpan(cellCtrl, cell.RowSpan);
                        if (cell.ColSpan > 1) Grid.SetColumnSpan(cellCtrl, cell.ColSpan);
                        rinf.Cells.Add(cellCtrl);


                        if (cell.RowSpan > 1)
                        {
                            multiRowsAtColIdx[colIdx] =
                                new MdSpan(cell.RowSpan, cell.ColSpan);
                        }

                        colIdx += cell.ColSpan;
                    }


                    foreach (var left in multiRowsAtColIdx.Where(tpl => tpl.Key >= colIdx)
                                                          .OrderBy(tpl => tpl.Key))
                    {
                        while (colIdx < left.Key)
                        {
                            var cellCtrl = new Border();
                            Grid.SetRow(cellCtrl, rowInfs.Count);
                            Grid.SetColumn(cellCtrl, colIdx);
                            rinf.Cells.Add(cellCtrl);

                            ++colIdx;
                        }
                        colIdx += left.Value.ColSpan;
                    }


                    rinf.ColumnCount = colIdx;
                    if (maxColCount < colIdx) maxColCount = colIdx;


                    ++i;
                }
                else
                {
                    rinf.ColumnCount = rowspansColOffset;
                }

                rowInfs.Add(rinf);


                // Removes multi-row cells,   複数行にまたがるセルの削除(必要なら)
                foreach (var spanEntry in multiRowsAtColIdx.ToArray())
                {
                    if (--spanEntry.Value.Life == 0)
                    {
                        multiRowsAtColIdx.Remove(spanEntry.Key);
                    }
                }
            }


            // if any multirow is left, insert an empty row.
            while (multiRowsAtColIdx.Count > 0)
            {
                var rinf = new RowInf();
                SetupClass(rinf, detailsRowIdx++, classNm);

                var colIdx = 0;
                foreach (var spanEntry in multiRowsAtColIdx.OrderBy(tpl => tpl.Key))
                {
                    while (colIdx < spanEntry.Key)
                    {
                        var cellCtrl = new Border();
                        Grid.SetRow(cellCtrl, rowInfs.Count);
                        Grid.SetColumn(cellCtrl, colIdx);
                        rinf.Cells.Add(cellCtrl);
                        colIdx++;
                    }
                    colIdx += spanEntry.Value.ColSpan;

                    if (--spanEntry.Value.Life == 0)
                    {
                        multiRowsAtColIdx.Remove(spanEntry.Key);
                    }
                }
                rinf.ColumnCount = colIdx;
                rowInfs.Add(rinf);
            }


            if (classNm is null)
            {
                rowInfs.Last().Classes.Add(ClassNames.TableLastRowClass);
            }


            static void SetupClass(RowInf rinf, int rowIndex, string? classNm)
            {
                if (classNm is not null)
                    rinf.Classes.Add(classNm);
                else if (rowIndex == 0)
                    rinf.Classes.AddRange(new[] { ClassNames.TableRowOddClass, ClassNames.TableFirstRowClass });
                else if (rowIndex % 2 == 0)
                    rinf.Classes.Add(ClassNames.TableRowOddClass);
                else
                    rinf.Classes.Add(ClassNames.TableRowEvenClass);
            }
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            string[,] cellTxt = new string[
                _all.Max(c => c.Row + c.RowSpan),
                _all.Max(c => c.Column + c.ColSpan)
            ];

            foreach (var para in _prevSelection.Cast<TableCellElement>())
            {
                cellTxt[para.Row, para.Column] = para.GetSelectedText().TrimEnd().Replace("\r\n", "\r").Replace('\n', '\r');
            }

            for (int i = 0; i < cellTxt.GetLength(0); i++)
            {
                var preLen = builder.Length;

                for (int j = 0; j < cellTxt.GetLength(1); j++)
                {
                    builder.Append(cellTxt[i, j] ?? "");
                    builder.Append("\t");
                }

                if (builder.Length - preLen == 0)
                    continue;

                if (builder[builder.Length - 1] != '\n')
                    builder.Append('\n');
            }
        }

        class MdSpan
        {
            public int Life { get; set; }
            public int ColSpan { get; }

            public MdSpan(int l, int c)
            {
                Life = l;
                ColSpan = c;
            }
        }


        class RowInf
        {
            public List<string> Classes { get; } = new List<string>(5);
            public List<Control> Cells { get; } = new List<Control>();
            public int ColumnCount;
        }

        class RowInfo
        {
            public string[] Classes { get; }
            public int ColumnCount { get; }

            public RowInfo(string[] classes, int colCount)
            {
                Classes = classes;
                ColumnCount = colCount;
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/TableCellElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class TableCellElement : DocumentElement
    {
        private readonly Lazy<Border> _control;
        private readonly EnumerableEx<DocumentElement> _items;
        private SelectionList? _prevSelection;

        internal int Row { get; set; }
        internal int Column { get; set; }
        public int RowSpan { set; get; }
        public int ColSpan { set; get; }
        public TextAlignment? Horizontal { set; get; }
        public VerticalAlignment? Vertical { set; get; }

        public override Control Control => _control.Value;

        public override IEnumerable<DocumentElement> Children => _items;

        public TableCellElement(DocumentElement cell)
        {
            _items = new[] { cell }.ToEnumerable();
            _control = new Lazy<Border>(CreateCell);
        }
        public TableCellElement(IEnumerable<DocumentElement> cells)
        {
            _items = cells.ToEnumerable();
            _control = new Lazy<Border>(CreateCell);
        }

        public override void Select(Point from, Point to)
        {
            var selection = SelectionUtil.SelectVertical(Control, _items, from, to);

            if (_prevSelection is not null)
            {
                foreach (var ps in _prevSelection)
                {
                    if (!selection.Any(cs => ReferenceEquals(cs, ps)))
                    {
                        ps.UnSelect();
                    }
                }
            }

            _prevSelection = selection;
        }

        public override void UnSelect()
        {
            foreach (var child in _items)
                child.UnSelect();
        }

        private Border CreateCell()
        {
            if (_items.Count == 1)
            {

                return new Border() { Child = Setup(_items[0].Control) };
            }
            else
            {
                var pnl = new StackPanel() { Orientation = Orientation.Vertical };
                foreach (var cnt in _items)
                    pnl.Children.Add(Setup(cnt.Control));

                return new Border() { Child = pnl };
            }
        }

        private Control Setup(Control control)
        {
            if (Horizontal.HasValue)
            {
                control.SetCurrentValue(TextBlock.TextAlignmentProperty, Horizontal.Value);

                switch (Horizontal.Value)
                {
                    case TextAlignment.Left:
                        control.HorizontalAlignment = HorizontalAlignment.Left;
                        break;
                    case TextAlignment.Right:
                        control.HorizontalAlignment = HorizontalAlignment.Right;
                        break;
                    case TextAlignment.Center:
                        control.HorizontalAlignment = HorizontalAlignment.Center;
                        break;
                }
            }
            return control;
        }

        public override void ConstructSelectedText(StringBuilder builder)
        {
            if (_prevSelection is null)
                return;

            var preLen = builder.Length;

            foreach (var para in _prevSelection)
            {
                para.ConstructSelectedText(builder);

                if (preLen == builder.Length)
                    continue;

                if (builder[builder.Length - 1] != '\n')
                    builder.Append('\n');
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/TextBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Documents;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class TextBlockElement : DocumentElement
    {
        private Lazy<TextBlock> _text;

        public string? Text => _text.Value.Text;

        public override Control Control => _text.Value;

        public override IEnumerable<DocumentElement> Children => Array.Empty<DocumentElement>();

        public TextBlockElement(IEnumerable<Inline> inlines)
        {
            _text = new Lazy<TextBlock>(() =>
            {
                var text = new TextBlock();
                if (text.Inlines is null)
                {
                    text.Inlines = new InlineCollection();
                }

                text.Inlines.AddRange(inlines);

                return text;
            });
        }

        public TextBlockElement(IEnumerable<Inline> inlines, string appendClass)
        {
            _text = new Lazy<TextBlock>(() =>
            {
                var text = new TextBlock();
                if (text.Inlines is null)
                {
                    text.Inlines = new InlineCollection();
                }
                text.Inlines.AddRange(inlines);

                text.Classes.Add(appendClass);
                return text;
            });
        }

        public TextBlockElement(IEnumerable<Inline> inlines, string appendClass, TextAlignment alignment)
        {
            _text = new Lazy<TextBlock>(() =>
            {
                var text = new TextBlock();
                if (text.Inlines is null)
                {
                    text.Inlines = new InlineCollection();
                }
                text.Inlines.AddRange(inlines);

                text.TextAlignment = alignment;
                text.Classes.Add(appendClass);
                return text;
            });
        }

        public override void Select(Point from, Point to) { }

        public override void UnSelect() { }

        public override void ConstructSelectedText(StringBuilder stringBuilder)
        {
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/TextMarkerStyle.cs
================================================
using Markdown.Avalonia;
using System;

namespace ColorDocument.Avalonia.DocumentElements
{
    public enum TextMarkerStyle
    {
        Box,
        Circle,
        Decimal,
        Disc,

        LowerLatin,
        LowerRoman,

        UpperLatin,
        UpperRoman,

        Square,
    }

    public static class MarkdownStyleExt
    {
        public static string CreateMakerText(this TextMarkerStyle textMarker, int index)
        {
            switch (textMarker)
            {
                default:
                    throw new InvalidOperationException("sorry library manager forget to modify about listmerker.");

                case TextMarkerStyle.Disc:
                    return "•";

                case TextMarkerStyle.Box:
                    return "▪";

                case TextMarkerStyle.Circle:
                    return "○";

                case TextMarkerStyle.Square:
                    return "❏";

                case TextMarkerStyle.Decimal:
                    return (index + 1).ToString() + ".";

                case TextMarkerStyle.LowerLatin:
                    return NumberToOrder.ToLatin(index + 1).ToLower() + ".";

                case TextMarkerStyle.UpperLatin:
                    return NumberToOrder.ToLatin(index + 1) + ".";

                case TextMarkerStyle.LowerRoman:
                    return NumberToOrder.ToRoman(index + 1).ToLower() + ".";

                case TextMarkerStyle.UpperRoman:
                    return NumberToOrder.ToRoman(index + 1) + ".";
            }
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/DocumentElements/UnBlockElement.cs
================================================
using Avalonia;
using Avalonia.Controls;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorDocument.Avalonia.DocumentElements
{
    public class UnBlockElement : DocumentElement
    {
        private Control _control;

        public override Control Control => _control;

        public override IEnumerable<DocumentElement> Children => Array.Empty<DocumentElement>();

        public UnBlockElement(Control control)
        {
            _control = control;
        }

        public override void Select(Point from, Point to) { }

        public override void UnSelect() { }

        public override void ConstructSelectedText(StringBuilder stringBuilder)
        {
        }
    }
}



================================================
FILE: ColorDocument.Avalonia/EnumerableExt.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ColorDocument.Avalonia
{
    internal static class EnumerableExt
    {
        public static EnumerableEx<T> ToEnumerable<T>(this IEnumerable<T> enumerable)
        {
            if (enumerable is List<T> list)
                return new EnumerableExLst<T>(list);
            else if (enumerable is T[] array)
                return new EnumerableExAry<T>(array);

            return new EnumerableExLzy<T>(enumerable);
        }
    }

    internal abstract class EnumerableEx<T> : IEnumerable<T>
    {
        public abstract int Count { get; }

        public abstract T this[int idx] { get; }

        public abstract IEnumerator<T> GetEnumerator();

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
    }

    internal class EnumerableExLzy<T> : EnumerableEx<T>
    {
        private Lazy<T[]> _lzy;

        public EnumerableExLzy(IEnumerable<T> enm)
        {
            _lzy = new Lazy<T[]>(() => enm.ToArray());
        }

        public override int Count => _lzy.Value.Length;

        public override T this[int idx] { get => _lzy.Value[idx]; }

        public override IEnumerator<T> GetEnumerator() => ((ICollection<T>)_lzy.Value).GetEnumerator();
    }

    internal class EnumerableExAry<T> : EnumerableEx<T>
    {
        private T[] _array;

        public EnumerableExAry(T[] array)
        {
            _array = array;
        }

        public override int Count => _array.Length;

        public override T this[int idx] { get => _array[idx]; }

        public override IEnumerator<T> GetEnumerator() => ((ICollection<T>)_array).GetEnumerator();
    }

    internal class EnumerableExLst<T> : EnumerableEx<T>
    {
        private IList<T> _list;

        public EnumerableExLst(IList<T> array)
        {
            _list = array;
        }

        public override int Count => _list.Count;

        public override T this[int idx] { get => _list[idx]; }

        public override IEnumerator<T> GetEnumerator() => _list.GetEnumerator();
    }
}


================================================
FILE: ColorDocument.Avalonia/NumberToOrder.cs
================================================
using System;
using System.Collections.Generic;
using System.Text;

namespace Markdown.Avalonia
{
    static class NumberToOrder
    {
        public static string ToRoman(int number)
        {
            // roman can treat between 1 and 3999
            if (number < 0 || number >= 4000) return number.ToString();

            if (number >= 1000) return "M" + ToRoman(number - 1000);
            if (number >= 900) return "CM" + ToRoman(number - 900);
            if (number >= 500) return "D" + ToRoman(number - 500);
            if (number >= 400) return "CD" + ToRoman(number - 400);
            if (number >= 100) return "C" + ToRoman(number - 100);
            if (number >= 90) return "XC" + ToRoman(number - 90);
            if (number >= 50) return "L" + ToRoman(number - 50);
            if (number >= 40) return "XL" + ToRoman(number - 40);
            if (number >= 10) return "X" + ToRoman(number - 10);
            if (number >= 9) return "IX" + ToRoman(number - 9);
            if (number >= 5) return "V" + ToRoman(number - 5);
            if (number >= 4) return "IV" + ToRoman(number - 4);
            if (number >= 1) return "I" + ToRoman(number - 1);
            if (number == 0) return "";

            throw new ArgumentOutOfRangeException("something bad happened");
        }

        public static string ToLatin(int number)
        {
            var buff = new StringBuilder();

            while (number > 0)
            {
                var mod = (number - 1) % 26;
                buff.Insert(0, (char)(mod + 'A'));

                number = (number - mod) / 26;
            }

            return buff.ToString();
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/RegionUtil.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;

namespace ColorDocument.Avalonia
{
    internal static class RegionUtil
    {
        public static Rect? GetRectInDoc(this Control control, Layoutable anchor)
        {
            if (!LayoutInformation.GetPreviousArrangeBounds(control).HasValue)
                return null;

            double driftX = 0;
            double driftY = 0;

            StyledElement? c;
            for (c = control.Parent;
                    c is not null
                    && c is Layoutable layoutable
                    && !ReferenceEquals(anchor, layoutable);
                    c = c.Parent)
            {
                driftX += layoutable.Bounds.X;
                driftY += layoutable.Bounds.Y;
            }

            return new Rect(
                        control.Bounds.X + driftX,
                        control.Bounds.Y + driftY,
                        control.Bounds.Width,
                        control.Bounds.Height);
        }



        public static EnumerableEx<DocumentElementWithBound> GetRectInDoc<T>(this EnumerableEx<T> controls, Layoutable anchor)
            where T : DocumentElement
        {
            var rs = new DocumentElementWithBound[controls.Count];
            for (var i = 0; i < rs.Length; ++i)
            {
                var doc = controls[i];
                var rect = doc.Control.GetRectInDoc(anchor);
                if (rect.HasValue)
                {
                    rs[i] = new DocumentElementWithBound(doc, rect.Value);
                }
            }

            return new EnumerableExAry<DocumentElementWithBound>(rs);
        }

    }

    internal struct DocumentElementWithBound
    {
        public DocumentElement Element { get; }
        public Rect Rect { get; }

        public DocumentElementWithBound(DocumentElement c, Rect r)
        {
            Element = c;
            Rect = r;
        }
    }
}


================================================
FILE: ColorDocument.Avalonia/SelectionList.cs
================================================
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ColorDocument.Avalonia
{
    public class SelectionList : IList<DocumentElement>
    {
        private SelectDirection _direction;
        private SelectRange _range;
        private IList<DocumentElement> _elements;

        public SelectionList(SelectDirection direction, SelectRange range, IList<DocumentElement> elements)
        {
            _direction = direction;
            _range = range;
            _elements = elements;
        }

        public SelectDirection Direction => _direction;

        public DocumentElement this[int index]
        {
            get => _elements[index];
            set => throw new InvalidOperationException();
        }

        public int Count => _elements.Count;

        public bool IsReadOnly => true;

        public void Add(DocumentElement item) => throw new InvalidOperationException();

        public void Clear() => throw new InvalidOperationException();

        public bool Contains(DocumentElement item) => _elements.Contains(item);

        public void CopyTo(DocumentElement[] array, int arrayIndex) => _elements.CopyTo(array, arrayIndex);

        public IEnumerator<DocumentElement> GetEnumerator() => _elements.GetEnumerator();

        public int IndexOf(DocumentElement item) => _elements.IndexOf(item);

        public void Insert(int index, DocumentElement item) => throw new InvalidOperationException();

        public bool Remove(DocumentElement item) => throw new InvalidOperationException();

        public void RemoveAt(int index) => throw new InvalidOperationException();

        IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
    }

    public enum SelectDirection
    {
        Forward, Backward
    }

    public enum SelectRange
    {
        Part = 0b0001,
        Begin = 0b0011,
        End = 0b0101,
        Fill = 0b0111,
    }
}


================================================
FILE: ColorDocument.Avalonia/SelectionUtil.cs
================================================
using Avalonia;
using Avalonia.Layout;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ColorDocument.Avalonia
{
    internal static class SelectionUtil
    {
        public static SelectionList SelectVertical<T>(Layoutable anchor, EnumerableEx<T> elements, Point from, Point to)
            where T : DocumentElement
        {
            var c = elements.GetRectInDoc(anchor);

            int fp = ComputeIdxVertical(c, from);
            int tp = ComputeIdxVertical(c, to);

            var list = Select(c, from, to, fp, tp);

            SelectRange rng =
                 (Math.Min(fp, tp) == 0 ? SelectRange.Begin : SelectRange.Part)
               | (Math.Max(fp, tp) == elements.Count - 1 ? SelectRange.End : SelectRange.Part);

            if (fp < tp)
            {
                return new SelectionList(SelectDirection.Forward, rng, list);
            }
            else
            {
                list.Reverse();
                return new SelectionList(SelectDirection.Backward, rng, list);
            }
        }

        public static SelectionList SelectGrid<T>(Layoutable anchor, EnumerableEx<T> elements, Point from, Point to)
            where T : DocumentElement
        {
            var c = elements.GetRectInDoc(anchor);

            int fp = ComputeIdxGrid(c, from);
            int tp = ComputeIdxGrid(c, to);

            var list = Select(c, from, to, fp, tp);

            SelectRange rng =
                 (Math.Min(fp, tp) == 0 ? SelectRange.Begin : SelectRange.Part)
               | (Math.Max(fp, tp) == elements.Count - 1 ? SelectRange.End : SelectRange.Part);

            if (fp < tp)
            {
                return new SelectionList(SelectDirection.Forward, rng, list);
            }
            else
            {
                list.Reverse();
                return new SelectionList(SelectDirection.Backward, rng, list);
            }
        }

        static int ComputeIdxVertical(EnumerableEx<DocumentElementWithBound> elements, Point pnt)
        {
            if (pnt.X <= 0 && pnt.Y <= 0)
                return 0;

            if (pnt.X == Double.PositiveInfinity && pnt.Y == Double.PositiveInfinity)
                return elements.Count - 1;

            foreach ((var c, int i) in elements.Select((value, index) => (value, index)))
            {
                var bounds = c.Rect;

                if (pnt.Y < bounds.Bottom)
                    return i;
            }

            return elements.Count - 1;
        }

        static int ComputeIdxGrid(EnumerableEx<DocumentElementWithBound> elements, Point pnt)
        {
            if (pnt.X <= 0 && pnt.Y <= 0)
                return 0;

            if (pnt.X == Double.PositiveInfinity && pnt.Y == Double.PositiveInfinity)
                return elements.Count - 1;


            double prevLeft = double.NegativeInfinity;
            int verticalLastHit = -1;

            foreach ((var c, int i) in elements.Select((value, index) => (value, index)))
            {
                var bounds = c.Rect;

                if (pnt.Y < bounds.Bottom)
                {
                    if (pnt.X < bounds.Right)
                        return i;

                    if (bounds.Left < prevLeft)
                        return verticalLastHit;

                    prevLeft = bounds.Left;
                    verticalLastHit = i;
                }
            }

            return elements.Count - 1;
        }

        private static List<DocumentElement> Select(EnumerableEx<DocumentElementWithBound> elements, Point from, Point to, int fp, int tp)
        {
            var list = new List<DocumentElement>();

            if (fp < tp)
            {
                var workF = from;
                var workT = new Point(Double.PositiveInfinity, Double.PositiveInfinity);

                for (var i = fp; i <= tp; ++i)
                {
                    if (i == tp)
                    {
                        workT = to;
                    }

                    var element = elements[i].Element;
                    var rect = elements[i].Rect;

                    element.Select(
                        new Point(workF.X - rect.X, workF.Y - rect.Y),
                        new Point(workT.X - rect.X, workT.Y - rect.Y));

                    list.Add(element);
                    workF = new Point(0, 0);
                }
            }
            else if (tp < fp)
            {
                var workF = from;
                var workT = new Point(0, 0);

                for (var i = fp; i >= tp; --i)
                {
                    if (i == tp)
                    {
                        workT = to;
                    }

                    var element = elements[i].Element;
                    var rect = elements[i].Rect;

                    element.Select(
                        new Point(workF.X - rect.X, workF.Y - rect.Y),
                        new Point(workT.X - rect.X, workT.Y - rect.Y));

                    list.Add(element);
                    workF = new Point(Double.PositiveInfinity, Double.PositiveInfinity);
                }
            }
            else
            {
                var element = elements[tp].Element;
                var rect = elements[tp].Rect;

                element.Select(
                       new Point(from.X - rect.X, from.Y - rect.Y),
                       new Point(to.X - rect.X, to.Y - rect.Y));

                list.Add(element);
            }

            return list;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CBold.cs
================================================
using System.Collections.Generic;
using Weight = Avalonia.Media.FontWeight;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Bold decoration
    /// </summary>
    public class CBold : CSpan
    {
        public CBold() { }

        public CBold(IEnumerable<CInline> inlines) : base(inlines)
        {
            FontWeight = Weight.Bold;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CCode.cs
================================================
using System.Collections.Generic;
using Avalonia.Media;
using Avalonia;
using ColorTextBlock.Avalonia.Fonts;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Monospace decoration
    /// </summary>
    public class CCode : CSpan
    {
        /// <summary>
        /// Monospace font family used for code display.
        /// </summary>
        /// <see cref="MonospaceFontFamily"/>
        public static readonly StyledProperty<FontFamily> MonospaceFontFamilyProperty =
            AvaloniaProperty.Register<CCode, FontFamily>(
                nameof(MonospaceFontFamily),
                defaultValue: FontFamilyCollector.TryGetMonospace() ?? FontFamily.Default,
                inherits: true);

        public CCode() {
            var obsvr = this.GetBindingObservable(MonospaceFontFamilyProperty);
            Bind(FontFamilyProperty, obsvr);
        }

        public CCode(IEnumerable<CInline> inlines) : base(inlines)
        {
            var obsvr = this.GetBindingObservable(MonospaceFontFamilyProperty);
            Bind(FontFamilyProperty, obsvr);
        }

        /// <summary>
        /// Monospace font family used for code display.
        /// </summary>
        public FontFamily MonospaceFontFamily
        {
            get { return GetValue(MonospaceFontFamilyProperty); }
            set { SetValue(MonospaceFontFamilyProperty, value); }
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CHyperlink.cs
================================================
using Avalonia;
using Avalonia.Input;
using Avalonia.Media;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Hyperlink decoration
    /// </summary>
    public class CHyperlink : CSpan
    {
        /// <summary>
        /// Background brush during mouse hover
        /// </summary>
        /// <seealso cref="HoverBackground"/>
        public static readonly StyledProperty<IBrush?> HoverBackgroundProperty =
            AvaloniaProperty.Register<CHyperlink, IBrush?>(nameof(Foreground));

        /// <summary>
        /// Foreground brush during mouse hover
        /// </summary>
        /// <seealso cref="HoverForeground"/>
        public static readonly StyledProperty<IBrush?> HoverForegroundProperty =
            AvaloniaProperty.Register<CHyperlink, IBrush?>(nameof(Foreground));

        /// <summary>
        /// Background brush during mouse hover
        /// </summary>
        public IBrush? HoverBackground
        {
            get { return GetValue(HoverBackgroundProperty); }
            set { SetValue(HoverBackgroundProperty, value); }
        }

        /// <summary>
        /// Foreground brush during mouse hover
        /// </summary>
        public IBrush? HoverForeground
        {
            get { return GetValue(HoverForegroundProperty); }
            set { SetValue(HoverForegroundProperty, value); }
        }

        /// <summary>
        /// Link click action
        /// </summary>
        public Action<string>? Command { get; set; }
        /// <summary>
        /// Link click action parameter
        /// </summary>
        public string? CommandParameter { get; set; }

        public CHyperlink() { }

        public CHyperlink(IEnumerable<CInline> inlines) : base(inlines)
        {
        }


        protected override IEnumerable<CGeometry> MeasureOverride(
            double entireWidth,
            double remainWidth)
        {
            var metrics = base.MeasureOverride(
                entireWidth,
                remainWidth);

            foreach (CGeometry metry in metrics)
            {
                metry.OnClick = ctrl => Command?.Invoke(CommandParameter ?? string.Empty);

                metry.OnMousePressed = ctrl =>
                {
                    PseudoClasses.Add(":pressed");
                };

                metry.OnMouseReleased = ctrl =>
                {
                    PseudoClasses.Remove(":pressed");
                };

                metry.OnMouseEnter = ctrl =>
                {
                    PseudoClasses.Add(":pointerover");
                    PseudoClasses.Add(":hover");

                    try
                    {
                        ctrl.Cursor = new Cursor(StandardCursorType.Hand);
                    }
                    catch { /*I cannot assume Cursor.ctor doesn't throw an exception.*/ }

                    IEnumerable<TextGeometry> tmetries =
                        (metry is DecoratorGeometry d) ?
                            d.Targets.OfType<TextGeometry>() :
                        (metry is TextGeometry t) ?
                            new[] { t } :
                            new TextGeometry[0];

                    if (tmetries != null)
                    {
                        foreach (var tmetry in tmetries)
                        {
                            tmetry.TemporaryForeground = HoverForeground;
                            tmetry.TemporaryBackground = HoverBackground;
                        }
                        RequestRender();
                    }
                };

                metry.OnMouseLeave = ctrl =>
                {
                    PseudoClasses.Remove(":pointerover");
                    PseudoClasses.Remove(":hover");

                    ctrl.Cursor = Cursor.Default;

                    IEnumerable<TextGeometry> tmetries =
                        (metry is DecoratorGeometry d) ?
                            d.Targets.OfType<TextGeometry>() :
                        (metry is TextGeometry t) ?
                            new[] { t } :
                            new TextGeometry[0];

                    if (tmetries != null)
                    {
                        foreach (var tmetry in tmetries)
                        {
                            tmetry.TemporaryForeground = null;
                            tmetry.TemporaryBackground = null;
                        }
                        RequestRender();
                    }
                };

                yield return metry;
            }
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CImage.cs
================================================
using Avalonia;
using Avalonia.Media.Imaging;
using Avalonia.Platform;
using Avalonia.Threading;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Threading;
using System.Threading.Tasks;
using Avalonia.Media;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Displays an image
    /// </summary>
    public class CImage : CInline
    {
        public static readonly StyledProperty<double?> LayoutWidthProperty =
            AvaloniaProperty.Register<CImage, double?>(nameof(LayoutWidth));

        public static readonly StyledProperty<double?> LayoutHeightProperty =
            AvaloniaProperty.Register<CImage, double?>(nameof(LayoutHeight));

        public static readonly StyledProperty<double?> RelativeWidthProperty =
            AvaloniaProperty.Register<CImage, double?>(nameof(RelativeWidth));

        /// <summary>
        /// Determine wheither image auto fitting or protrude outside Control
        /// when image is too width to be rendered in control.
        /// If you set 'true', Image is fitted to control width.
        /// </summary>
        public static readonly StyledProperty<bool> FittingWhenProtrudeProperty =
            AvaloniaProperty.Register<CImage, bool>(nameof(FittingWhenProtrude), defaultValue: true);

        /// <summary>
        /// Save aspect ratio if one of <see cref="LayoutHeightProperty"/> or <see cref="LayoutWidthProperty"/> set.
        /// </summary>
        public static readonly StyledProperty<bool> SaveAspectRatioProperty =
            AvaloniaProperty.Register<CImage, bool>(nameof(SaveAspectRatio));

        public double? LayoutWidth
        {
            get { return GetValue(LayoutWidthProperty); }
            set { SetValue(LayoutWidthProperty, value); }
        }
        public double? LayoutHeight
        {
            get { return GetValue(LayoutHeightProperty); }
            set { SetValue(LayoutHeightProperty, value); }
        }

        public double? RelativeWidth
        {
            get { return GetValue(RelativeWidthProperty); }
            set { SetValue(RelativeWidthProperty, value); }
        }

        public bool FittingWhenProtrude
        {
            get { return GetValue(FittingWhenProtrudeProperty); }
            set { SetValue(FittingWhenProtrudeProperty, value); }
        }

        public bool SaveAspectRatio
        {
            get => GetValue(SaveAspectRatioProperty);
            set => SetValue(SaveAspectRatioProperty, value);
        }

        public Task<IImage?>? Task { get; }
        private IImage WhenError { get; }
        public IImage? Image { private set; get; }

        public CImage(Task<IImage?> task, IImage whenError)
        {
            if (task is null) throw new NullReferenceException(nameof(task));
            if (whenError is null) throw new NullReferenceException(nameof(whenError));

            this.Task = task;
            this.WhenError = whenError;
        }

        public CImage(IImage image)
        {
            if (image is null) throw new NullReferenceException(nameof(image));
            this.WhenError = this.Image = image;
        }

        protected override IEnumerable<CGeometry> MeasureOverride(
            double entireWidth, double remainWidth)
        {
            if (Image is null)
            {
                if (Task is null)
                {
                    Image = WhenError;
                }
                else if (
                       Task.Status == TaskStatus.RanToCompletion
                    || Task.Status == TaskStatus.Faulted
                    || Task.Status == TaskStatus.Canceled)
                {
                    Image = Task.IsFaulted ? WhenError : Task.Result ?? WhenError;
                }
                else
                {
                    Image = new WriteableBitmap(
                                    new PixelSize(1, 1),
                                    new Vector(96, 96),
                                    PixelFormat.Rgb565,
                                    AlphaFormat.Premul);

                    Thread.MemoryBarrier();

                    System.Threading.Tasks.Task.Run(() =>
                    {
                        Task.Wait();
                        Dispatcher.UIThread.InvokeAsync(() =>
                        {
                            Image = Task.IsFaulted ? WhenError : Task.Result ?? WhenError;
                            RequestMeasure();
                        });

                    });
                }
            }

            double imageWidth = Image.Size.Width;
            double imageHeight = Image.Size.Height;

            if (RelativeWidth.HasValue)
            {
                var aspect = imageHeight / imageWidth;
                imageWidth = RelativeWidth.Value * entireWidth;
                imageHeight = aspect * imageWidth;
            }

            if (LayoutWidth.HasValue)
            {
                imageWidth = LayoutWidth.Value;
                if (SaveAspectRatio && !LayoutHeight.HasValue)
                {
                    var aspect = Image.Size.Height / Image.Size.Width;
                    imageHeight = aspect * imageWidth;
                }
            }

            if (LayoutHeight.HasValue)
            {
                imageHeight = LayoutHeight.Value;
                if (SaveAspectRatio && !LayoutWidth.HasValue)
                {
                    var aspect = Image.Size.Width / Image.Size.Height;
                    imageWidth = aspect * imageHeight;
                }
            }

            if (imageWidth > remainWidth)
            {
                if (entireWidth != remainWidth)
                {
                    yield return new LineBreakMarkGeometry(this);
                }

                if (FittingWhenProtrude && imageWidth > entireWidth)
                {
                    var aspect = imageHeight / imageWidth;
                    imageWidth = entireWidth;
                    imageHeight = aspect * imageWidth;
                }
            }

            yield return new ImageGeometry(this, Image, imageWidth, imageHeight, TextVerticalAlignment);
        }

        public override string AsString() => " $$Image$$ ";
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CInline.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using Avalonia.Media;
using ColorTextBlock.Avalonia.Geometries;
using System.Collections.Generic;
using System.ComponentModel;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// The base class for representing a text element.
    /// </summary>
    // テキスト要素を表現するための基底のクラス
    [TypeConverter(typeof(StringToRunConverter))]
    public abstract class CInline : StyledElement
    {
        /// <summary>
        /// The brush of background.
        /// </summary>
        /// <seealso cref="Background"/>
        public static readonly StyledProperty<IBrush?> BackgroundProperty =
            AvaloniaProperty.Register<CInline, IBrush?>(nameof(Background), inherits: true);

        /// <summary>
        /// The brush of the text element.
        /// </summary>
        /// <seealso cref="Foreground"/>
        public static readonly StyledProperty<IBrush?> ForegroundProperty =
            TextBlock.ForegroundProperty.AddOwner<CInline>();

        /// <summary>
        /// The font family of the text element
        /// </summary>
        /// <seealso cref="FontFamily"/>
        public static readonly StyledProperty<FontFamily> FontFamilyProperty =
            TextBlock.FontFamilyProperty.AddOwner<CInline>();

        /// <summary>
        /// The font weight of the text element
        /// </summary>
        /// <seealso cref="FontWeight"/>
        public static readonly StyledProperty<FontWeight> FontWeightProperty =
            TextBlock.FontWeightProperty.AddOwner<CInline>();

        /// <summary>
        /// The font stretch of the text element
        /// </summary>
        /// <seealso cref="FontStretch"/>
        public static readonly StyledProperty<FontStretch> FontStretchProperty =
            TextBlock.FontStretchProperty.AddOwner<CInline>();

        /// <summary>
        /// The font size of the text element
        /// </summary>
        /// <seealso cref="FontSize"/>
        public static readonly StyledProperty<double> FontSizeProperty =
            TextBlock.FontSizeProperty.AddOwner<CInline>();

        /// <summary>
        /// The font style of the text element
        /// </summary>
        /// <seealso cref="FontStyle"/>
        public static readonly StyledProperty<FontStyle> FontStyleProperty =
            TextBlock.FontStyleProperty.AddOwner<CInline>();

        /// <summary>
        /// Use to indicate the vertical position of text within line.
        /// For example, it is used to align text to the top or to the bottom.
        /// </summary>
        /// <seealso cref="TextVerticalAlignment"/>
        // テキストを上揃えで描画するか下揃えで描画するか指定します。
        public static readonly StyledProperty<TextVerticalAlignment> TextVerticalAlignmentProperty =
            CTextBlock.TextVerticalAlignmentProperty.AddOwner<CInline>();

        /// <summary>
        /// Indicates whether the text element is underlined.
        /// If this property value is true, the text element is underlined.
        /// </summary>
        /// <seealso cref="IsUnderline"/>
        public static readonly StyledProperty<bool> IsUnderlineProperty =
            AvaloniaProperty.Register<CInline, bool>(nameof(IsUnderline), inherits: true);

        /// <summary>
        /// Indicates whether the text element is strikethrough.
        /// If the value of this property is true, the text element is strikethrough.
        /// </summary>
        /// <seealso cref="IsStrikethrough"/>
        public static readonly StyledProperty<bool> IsStrikethroughProperty =
            AvaloniaProperty.Register<CInline, bool>(nameof(IsStrikethrough), inherits: true);

        /// <summary>
        /// The brush of background.
        /// </summary>
        public IBrush? Background
        {
            get { return GetValue(BackgroundProperty); }
            set { SetValue(BackgroundProperty, value); }
        }

        /// <summary>
        /// The brush of the text element.
        /// </summary>
        public IBrush? Foreground
        {
            get { return GetValue(ForegroundProperty); }
            set { SetValue(ForegroundProperty, value); }
        }

        /// <summary>
        /// The font family of the text element
        /// </summary>
        public FontFamily FontFamily
        {
            get { return GetValue(FontFamilyProperty); }
            set { SetValue(FontFamilyProperty, value); }
        }

        /// <summary>
        /// The font size of the text element
        /// </summary>
        public double FontSize
        {
            get { return GetValue(FontSizeProperty); }
            set { SetValue(FontSizeProperty, value); }
        }

        /// <summary>
        /// The font stretch of the text element
        /// </summary>
        public FontStyle FontStyle
        {
            get { return GetValue(FontStyleProperty); }
            set { SetValue(FontStyleProperty, value); }
        }

        /// <summary>
        /// The font weight of the text element
        /// </summary>
        public FontWeight FontWeight
        {
            get { return GetValue(FontWeightProperty); }
            set { SetValue(FontWeightProperty, value); }
        }

        /// <summary>
        /// The font stretch of the text element
        /// </summary>
        public FontStretch FontStretch
        {
            get { return GetValue(FontStretchProperty); }
            set { SetValue(FontStretchProperty, value); }
        }

        /// <summary>
        /// Typeface of the text element
        /// </summary>
        public Typeface Typeface
        {
            get;
            private set;
        }

        /// <summary>
        /// Indicates whether the text element is underlined.
        /// If this property value is true, the text element is underlined.
        /// </summary>
        public bool IsUnderline
        {
            get { return GetValue(IsUnderlineProperty); }
            set { SetValue(IsUnderlineProperty, value); }
        }

        /// <summary>
        /// Indicates whether the text element is strikethrough.
        /// If the value of this property is true, the text element is strikethrough.
        /// </summary>
        public bool IsStrikethrough
        {
            get { return GetValue(IsStrikethroughProperty); }
            set { SetValue(IsStrikethroughProperty, value); }
        }

        /// <summary>
        /// Use to indicate the vertical position of text within line.
        /// For example, it is used to align text to the top or to the bottom.
        /// </summary>
        public TextVerticalAlignment TextVerticalAlignment
        {
            get { return GetValue(TextVerticalAlignmentProperty); }
            set { SetValue(TextVerticalAlignmentProperty, value); }
        }

        protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
        {
            base.OnPropertyChanged(change);

            switch (change.Property.Name)
            {
                case nameof(Background):
                case nameof(Foreground):
                case nameof(IsUnderline):
                case nameof(IsStrikethrough):
                    RequestRender();
                    break;

                case nameof(FontFamily):
                case nameof(FontSize):
                case nameof(FontStyle):
                case nameof(FontWeight):
                case nameof(FontStretch):
                    Typeface = new Typeface(FontFamily, FontStyle, FontWeight, FontStretch);
                    goto case nameof(TextVerticalAlignment);

                case nameof(TextVerticalAlignment):
                    RequestMeasure();
                    break;
            }
        }

        protected void RequestMeasure()
        {
            if (Parent is CInline cline)
            {
                cline.RequestMeasure();
            }
            else if (Parent is CTextBlock ctxt)
            {
                ctxt.OnMeasureSourceChanged();
            }
            else if (Parent is Layoutable layout)
            {
                layout.InvalidateMeasure();
            }
        }

        protected void RequestRender()
        {
            try
            {
                if (Parent is CInline cline)
                {
                    cline.RequestRender();
                }
                else if (Parent is Layoutable layout)
                {
                    layout.InvalidateVisual();
                }
            }
            catch
            {
                // An error occured sometimes with FluentAvalonia.
            }
        }

        internal IEnumerable<CGeometry> Measure(double entireWidth, double remainWidth)
        {
            Typeface = new Typeface(FontFamily, FontStyle, FontWeight, FontStretch);

            /*
             * This is Imitation of Layoutable.MeasureCore.
             * If parent style is changed, StyledElement.InvalidedStyles is called.
             * This method clear all applied styles, 
             * so we should reapply style after style change.
             */
            ApplyStyling();

            return MeasureOverride(entireWidth, remainWidth);
        }

        protected abstract IEnumerable<CGeometry> MeasureOverride(
            double entireWidth,
            double remainWidth);


        /// <summary>
        /// Returns the string that this instance displays.
        /// </summary>
        /// <returns></returns>
        // この要素が表示する文字を返します。
        public abstract string AsString();
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CInlineUIContainer.cs
================================================
using Avalonia;
using Avalonia.Controls;
using ColorTextBlock.Avalonia.Geometies;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Text;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Places a control as an inline element.
    /// </summary>
    public class CInlineUIContainer : CInline
    {
        /// <summary>
        /// A displayed control
        /// </summary>
        public Control? Content { get; set; }
        internal DummyGeometryForControl? Indicator { get; private set; }

        public CInlineUIContainer(Control content)
        {
            Content = content;
        }

        protected override IEnumerable<CGeometry> MeasureOverride(double entireWidth, double remainWidth)
        {
            if (Content is null)
            {
                Indicator = null;
                return new CGeometry[0];
            }

            Content.Measure(new Size(remainWidth, Double.PositiveInfinity));

            if (Content.DesiredSize.Width > remainWidth)
            {
                Content.Measure(new Size(entireWidth, Double.PositiveInfinity));
                Indicator = new DummyGeometryForControl(this, Content, TextVerticalAlignment);
                return new CGeometry[] { new LineBreakMarkGeometry(this), Indicator };
            }
            else
            {
                Indicator = new DummyGeometryForControl(this, Content, TextVerticalAlignment);
                return new[] { Indicator };
            }
        }

        /// <inheritdoc/>
        public override string AsString() => String.Empty;
    }
}

================================================
FILE: ColorTextBlock.Avalonia/CItalic.cs
================================================
using System.Collections.Generic;
using FStyle = Avalonia.Media.FontStyle;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Italic decoration
    /// </summary>
    public class CItalic : CSpan
    {
        public CItalic() { }

        public CItalic(IEnumerable<CInline> inlines) : base(inlines)
        {
            FontStyle = FStyle.Italic;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CLineBreak.cs
================================================
using Avalonia;
using Avalonia.Media;
using ColorTextBlock.Avalonia.Geometries;
using System.Collections.Generic;
using System.Globalization;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Expression of the linebreak.
    /// </summary>
    public class CLineBreak : CRun
    {
        public CLineBreak()
        {
            Text = "\n";
        }

        protected override IEnumerable<CGeometry> MeasureOverride(
            double entireWidth,
            double remainWidth)
        {
            var ftxt = new FormattedText(
                        "Ty",
                        CultureInfo.CurrentCulture,
                        FlowDirection.LeftToRight,
                        new Typeface(FontFamily, FontStyle, FontWeight),
                        FontSize,
                        Foreground);

            yield return new LineBreakMarkGeometry(this, ftxt.Height);
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CRun.cs
================================================
using Avalonia;
using Avalonia.Media;
using Avalonia.Media.TextFormatting;
using Avalonia.Media.TextFormatting.Unicode;
using Avalonia.Metadata;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Expression of a text
    /// </summary>
    public class CRun : CInline
    {
        /// <summary>
        /// THe content of the eleemnt
        /// </summary>
        /// <seealso cref="Content"/>
        public static readonly StyledProperty<string> TextProperty =
            AvaloniaProperty.Register<CRun, string>(nameof(Text));

        /// <summary>
        /// THe content of the eleemnt
        /// </summary>
        [Content]
        public string Text
        {
            get { return GetValue(TextProperty); }
            set { SetValue(TextProperty, value); }
        }

        protected override IEnumerable<CGeometry> MeasureOverride(
            double entireWidth,
            double remainWidth)
        {
            if (String.IsNullOrEmpty(Text))
            {
                return Array.Empty<CGeometry>();
            }

            var runProps = CreateTextRunProperties(Foreground);
            var paraProps = CreateTextParagraphProperties(runProps);
            var source = new SimpleTextSource(Text.AsMemory(), runProps);

            if (remainWidth == entireWidth)
            {
                return CreateLines(source, entireWidth, paraProps);
            }

            var firstLine = TextFormatter.Current.FormatLine(source, 0, double.PositiveInfinity, paraProps);
            if (firstLine is null)
            {
                return Array.Empty<CGeometry>();
            }

            if (firstLine.Width < remainWidth)
            {
                if (firstLine.Length == Text.Length)
                {
                    return new List<CGeometry>() { new TextLineGeometry(this, source, firstLine, false) };
                }

                return CreateLines(source, entireWidth, paraProps, firstLine);
            }
            else
            {
                var firstLineSource = source.Subsource(firstLine.FirstTextSourceIndex, firstLine.Length);
                var firstLineRemain = TextFormatter.Current.FormatLine(firstLineSource, 0, remainWidth, paraProps)!;

                var breakPosEnum = new LineBreakEnumerator(Text.AsMemory().Slice(firstLine.FirstTextSourceIndex, firstLine.Length).Span);
                int breakPos = breakPosEnum.MoveNext(out var lnbrk) ? lnbrk.PositionWrap : int.MaxValue;


                if (breakPos < firstLineRemain.Length)
                {
                    // correct wrap

                    return CreateLines(source, entireWidth, paraProps, firstLineRemain);
                }
                else
                {
                    // wrong wrap; first line word is too long

                    return CreateLines(source, entireWidth, paraProps, new LineBreakMarkGeometry(this));
                }
            }
        }

        private IEnumerable<CGeometry> CreateLines(
            SimpleTextSource source,
            double entireWidth,
            TextParagraphProperties paraProps,
            TextLine firstLine)
        {
            TextLine prev = firstLine;

            var length = firstLine.Length;
            while (length < Text.Length)
            {
                var line = TextFormatter.Current.FormatLine(source, length, entireWidth, paraProps, prev.TextLineBreak);
                if (line is null)
                    break;

                yield return new TextLineGeometry(this, source, prev, true);

                prev = line;
                length += line.Length;
            }

            yield return new TextLineGeometry(this, source, prev, false);
        }

        private IEnumerable<CGeometry> CreateLines(
            SimpleTextSource source,
            double entireWidth,
            TextParagraphProperties paraProps,
            CGeometry? prevGeo = null)
        {
            if (prevGeo is not null)
                yield return prevGeo;

            TextLine? prev = TextFormatter.Current.FormatLine(source, 0, entireWidth, paraProps);
            if (prev is null)
                yield break;

            var length = prev.Length;
            while (length < Text.Length)
            {
                var line = TextFormatter.Current.FormatLine(source, length, entireWidth, paraProps, prev.TextLineBreak);
                if (line is null)
                    break;

                yield return new TextLineGeometry(this, source, prev, true);

                prev = line;
                length += line.Length;
            }

            yield return new TextLineGeometry(this, source, prev, false);
        }




        internal TextParagraphProperties CreateTextParagraphProperties(TextRunProperties runProps)
            => new GenericTextParagraphProperties(
                        FlowDirection.LeftToRight,
                        TextAlignment.Left, true, false,
                        runProps,
                        TextWrapping.Wrap,
                        double.NaN,
                        0,
                        0);

        internal TextRunProperties CreateTextRunProperties(IBrush? foreground)
            => new GenericTextRunProperties(Typeface, FontSize, foregroundBrush: foreground);

        public override string AsString() => Text;
    }


    readonly struct SimpleTextSource : ITextSource
    {
        private readonly ReadOnlyMemory<char> _text;
        private readonly TextRunProperties _props;

        public TextRunProperties RunProperties => _props;

        public SimpleTextSource(ReadOnlyMemory<char> text, TextRunProperties props)
        {
            _text = text;
            _props = props;
        }

        public TextRun? GetTextRun(int textSourceIndex)
        {
            return new TextCharacters(_text.Slice(textSourceIndex), _props);
        }

        public SimpleTextSource Subsource(int start, int length)
            => new SimpleTextSource(_text.Slice(start, length), _props);

        public string Substring(int start, int length)
            => _text.Slice(start, length).ToString();

        public string Substring(int start)
            => _text.Slice(start).ToString();

        public SimpleTextSource ChangeForeground(IBrush? foreground)
        {
            var runProps = new GenericTextRunProperties(_props.Typeface, _props.FontRenderingEmSize, foregroundBrush: foreground);
            return new SimpleTextSource(_text, runProps);
        }

        public override string ToString() => _text.ToString();
    }
}

================================================
FILE: ColorTextBlock.Avalonia/CSpan.cs
================================================
using Avalonia;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Media;
using Avalonia.Metadata;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Text decoration
    /// </summary>
    public class CSpan : CInline
    {
        /// <summary>
        /// The thickness of the border
        /// </summary>
        /// <seealso cref="BorderThickness"/>
        public static readonly StyledProperty<Thickness> BorderThicknessProperty =
            AvaloniaProperty.Register<CSpan, Thickness>(nameof(BorderThickness));

        /// <summary>
        /// The brush of the border.
        /// </summary>
        /// <seealso cref="BorderBrush"/>
        public static readonly StyledProperty<IBrush> BorderBrushProperty =
            AvaloniaProperty.Register<CSpan, IBrush>(nameof(BorderBrush));

        /// <summary>
        /// The radius of the border rounded corners
        /// </summary>
        /// <seealso cref="CornerRadius"/>
        public static readonly StyledProperty<CornerRadius> CornerRadiusProperty =
            AvaloniaProperty.Register<CSpan, CornerRadius>(nameof(CornerRadius));

        /// <summary>
        /// The box shadow effect parameters
        /// </summary>
        /// <seealso cref="BoxShadow"/>
        public static readonly StyledProperty<BoxShadows> BoxShadowProperty =
            AvaloniaProperty.Register<CSpan, BoxShadows>(nameof(BoxShadow));

        /// <summary>
        /// The padding to place around the Child control.
        /// </summary>
        /// <seealso cref="Padding"/>
        public static readonly StyledProperty<Thickness> PaddingProperty =
            AvaloniaProperty.Register<CSpan, Thickness>(nameof(Padding));

        /// <summary>
        /// The margin around the element.
        /// </summary>
        /// <seealso cref="Margin"/>
        public static readonly StyledProperty<Thickness> MarginProperty =
            InputElement.MarginProperty.AddOwner<CSpan>();

        /// <summary>
        /// THe content of the eleemnt
        /// </summary>
        /// <seealso cref="Content"/>
        public static readonly StyledProperty<IEnumerable<CInline>> ContentProperty =
            AvaloniaProperty.Register<CSpan, IEnumerable<CInline>>(nameof(Content));

        static CSpan()
        {
            ContentProperty.Changed.AddClassHandler<CSpan>(
                (x, e) =>
                {
                    if (e.OldValue is IEnumerable<CInline> oldlines)
                    {
                        foreach (var child in oldlines)
                            x.LogicalChildren.Remove(child);
                    }
                    if (e.NewValue is IEnumerable<CInline> newlines)
                    {
                        foreach (var child in newlines)
                            x.LogicalChildren.Add(child);
                    }
                });
        }

        private Border? _border;

        /// <summary>
        /// The thickness of the border
        /// </summary>
        public Thickness BorderThickness
        {
            get => GetValue(BorderThicknessProperty);
            set => SetValue(BorderThicknessProperty, value);
        }

        /// <summary>
        /// The brush of the border.
        /// </summary>
        public IBrush BorderBrush
        {
            get => GetValue(BorderBrushProperty);
            set => SetValue(BorderBrushProperty, value);
        }

        /// <summary>
        /// The radius of the border rounded corners
        /// </summary>
        public CornerRadius CornerRadius
        {
            get => GetValue(CornerRadiusProperty);
            set => SetValue(CornerRadiusProperty, value);
        }

        /// <summary>
        /// The box shadow effect parameters
        /// </summary>
        public BoxShadows BoxShadow
        {
            get => GetValue(BoxShadowProperty);
            set => SetValue(BoxShadowProperty, value);
        }

        /// <summary>
        /// The padding to place around the Child control.
        /// </summary>
        public Thickness Padding
        {
            get => GetValue(PaddingProperty);
            set => SetValue(PaddingProperty, value);
        }

        /// <summary>
        /// The margin around the element.
        /// </summary>
        public Thickness Margin
        {
            get => GetValue(MarginProperty);
            set => SetValue(MarginProperty, value);
        }

        /// <summary>
        /// THe content of the eleemnt
        /// </summary>
        [Content]
        public IEnumerable<CInline> Content
        {
            get { return GetValue(ContentProperty); }
            set { SetValue(ContentProperty, value); }
        }

        public CSpan()
        {
            var clst = new AvaloniaList<CInline>();
            // for xaml loader
            clst.CollectionChanged += (s, e) =>
            {
                if (e.OldItems != null)
                    foreach (var child in e.OldItems)
                        LogicalChildren.Remove((CInline)child);

                if (e.NewItems != null)
                    foreach (var child in e.NewItems)
                        LogicalChildren.Add((CInline)child);
            };

            Content = clst;
        }

        public CSpan(IEnumerable<CInline> inlines)
        {
            Content = inlines.ToArray();
        }

        protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
        {
            base.OnPropertyChanged(change);

            switch (change.Property.Name)
            {
                case nameof(BorderThickness):
                case nameof(CornerRadius):
                case nameof(BoxShadow):
                case nameof(Padding):
                case nameof(Margin):
                    OnBorderPropertyChanged(true);
                    break;

                case nameof(BorderBrush):
                    OnBorderPropertyChanged(false);
                    break;
            }
        }

        private void OnBorderPropertyChanged(bool requestMeasure)
        {
            bool borderEnabled =
                BorderThickness != default ||
                Padding != default ||
                CornerRadius != default ||
                Margin != default ||
                !BoxShadow.Equals(default);

            if (borderEnabled)
            {
                if (_border is null)
                {
                    _border = new Border();
                    LogicalChildren.Add(_border);
                }

                _border.BorderThickness = BorderThickness;
                _border.BorderBrush = BorderBrush;
                _border.CornerRadius = CornerRadius;
                _border.BoxShadow = BoxShadow;
                _border.Padding = Padding;
                _border.Margin = Margin;
            }
            else
            {
                if (_border is not null)
                    LogicalChildren.Remove(_border);
                _border = null;
            }

            if (requestMeasure) RequestMeasure();
            else RequestRender();
        }

        protected override IEnumerable<CGeometry> MeasureOverride(
            double entireWidth,
            double remainWidth)
        {
            if (_border is not null)
            {
                _border.Measure(Size.Infinity);

                entireWidth -= _border.DesiredSize.Width;
                remainWidth -= _border.DesiredSize.Width;

                return PrivateMeasure(_border, entireWidth, remainWidth);
            }
            else
            {
                return PrivateMeasure(entireWidth, remainWidth);
            }
        }

        private IEnumerable<CGeometry> PrivateMeasure(
            Border border,
            double entireWidth,
            double remainWidth)
        {
            var buffer = new List<CGeometry>();
            foreach (var adding in PrivateMeasure(entireWidth, remainWidth))
            {
                // save linebreak before span
                if (adding is LineBreakMarkGeometry && buffer.Count == 0)
                {
                    yield return adding;
                    continue;
                }

                buffer.Add(adding);

                if (adding.LineBreak)
                {
                    yield return DecoratorGeometry.New(this, buffer, border);
                    buffer.Clear();
                }
            }
            if (buffer.Count != 0)
            {
                yield return DecoratorGeometry.New(this, buffer, border);
            }
        }

        private IEnumerable<CGeometry> PrivateMeasure(
            double entireWidth,
            double remainWidth)
        {
            foreach (CInline inline in Content)
            {
                IEnumerable<CGeometry> addings = inline.Measure(entireWidth, remainWidth);
                foreach (var add in addings)
                {
                    yield return add;

                    if (add.LineBreak) remainWidth = entireWidth;
                    else remainWidth -= add.Width;
                }
            }
        }

        public override string AsString() => String.Join("", Content.Select(c => c.AsString()));
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CStrikethrough.cs
================================================
using System.Collections.Generic;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Strikethrough decoration
    /// </summary>
    public class CStrikethrough : CSpan
    {
        public CStrikethrough() { }

        public CStrikethrough(IEnumerable<CInline> inlines) : base(inlines)
        {
            IsStrikethrough = true;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CTextBlock.cs
================================================

using Avalonia;
using Avalonia.Automation.Peers;
using Avalonia.Collections;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Layout;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using Avalonia.Metadata;
using Avalonia.Rendering.Composition;
using Avalonia.Utilities;
using Avalonia.VisualTree;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// TextBlock to enables character-by-character decoration.
    /// </summary>
    // 文字ごとの装飾を可能とするTextBlock
    public class CTextBlock : Control, ITextPointerHandleable
    {
        /// <summary>
        /// Use for adjusting vertical position between CTextBlocks. e.g. between a list marker and a list item.
        /// </summary>
        // リストマーカーと項目の縦位置の調整といった、CTextBlock間で文字の位置調整に使用します。
        private static readonly StyledProperty<double> BaseHeightProperty =
            AvaloniaProperty.Register<CTextBlock, double>("BaseHeight");

        /// <summary>
        /// Use to indicate the height of each lines. If this value is NaN, the height is calculated by content.
        /// </summary>
        /// <seealso cref="LineHeight"/>
        // 一行の高さ指定の為に使用します。指定がない(NaN)の場合、コンテンツによって行の高さが決まります。
        public static readonly StyledProperty<double> LineHeightProperty =
            AvaloniaProperty.Register<CTextBlock, double>(nameof(LineHeight), defaultValue: Double.NaN);

        /// <summary>
        /// Line to line spacing.
        /// </summary>
        /// <seealso cref="LineSpacing"/>
        // 行間の幅
        public static readonly StyledProperty<double> LineSpacingProperty =
            AvaloniaProperty.Register<CTextBlock, double>(nameof(LineSpacing), defaultValue: 0);

        /// <summary>
        /// The brush of background.
        /// </summary>
        /// <seealso cref="Background"/>
        public static readonly StyledProperty<IBrush?> BackgroundProperty =
            Border.BackgroundProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// The brush of characters.
        /// </summary>
        /// <seealso cref="Foreground"/>
        public static readonly StyledProperty<IBrush?> ForegroundProperty =
            TextBlock.ForegroundProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// The font family of characters
        /// </summary>
        /// <seealso cref="FontFamily"/>
        public static readonly StyledProperty<FontFamily> FontFamilyProperty =
            TextBlock.FontFamilyProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// The font weight of characters
        /// </summary>
        /// <seealso cref="FontWeight"/>
        public static readonly StyledProperty<FontWeight> FontWeightProperty =
            TextBlock.FontWeightProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// The font size of characters
        /// </summary>
        /// <seealso cref="FontSize"/>
        public static readonly StyledProperty<double> FontSizeProperty =
            TextBlock.FontSizeProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// The font style of characters
        /// </summary>
        /// <seealso cref="FontStyle"/>
        public static readonly StyledProperty<FontStyle> FontStyleProperty =
            TextBlock.FontStyleProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// Use to indicate the vertical position of text within line.
        /// For example, it is used to align text to the top or to the bottom.
        /// </summary>
        /// <seealso cref="TextVerticalAlignment"/>
        // テキストを上揃えで描画するか下揃えで描画するか指定します。
        public static readonly StyledProperty<TextVerticalAlignment> TextVerticalAlignmentProperty =
            AvaloniaProperty.Register<CTextBlock, TextVerticalAlignment>(
                nameof(TextVerticalAlignment),
                defaultValue: TextVerticalAlignment.Base,
                inherits: true);

        /// <summary>
        /// Use to indicate the mode of text wrapping.
        /// </summary>
        /// <seealso cref="TextWrapping"/>
        public static readonly StyledProperty<TextWrapping> TextWrappingProperty =
            AvaloniaProperty.Register<CTextBlock, TextWrapping>(nameof(TextWrapping), defaultValue: TextWrapping.Wrap);

        /// <summary>
        /// Contents to be displayed.
        /// </summary>
        /// <seealso cref="Content"/>
        public static readonly DirectProperty<CTextBlock, AvaloniaList<CInline>> ContentProperty =
            AvaloniaProperty.RegisterDirect<CTextBlock, AvaloniaList<CInline>>(
                nameof(Content),
                    o => o.Content,
                    (o, v) => o.Content = v);

        public static readonly StyledProperty<IBrush?> SelectionBrushProperty =
            SelectableTextBlock.SelectionBrushProperty.AddOwner<CTextBlock>();

        /// <summary>
        /// Horizontal text alignment.
        /// </summary>
        /// <seealso cref="TextAlignment"/>
        public static readonly StyledProperty<TextAlignment> TextAlignmentProperty =
            AvaloniaProperty.Register<CTextBlock, TextAlignment>(
                nameof(TextAlignment), defaultValue: TextAlignment.Left);

        static CTextBlock()
        {
            ClipToBoundsProperty.OverrideDefaultValue<CTextBlock>(true);

            AffectsRender<CTextBlock>(
                BackgroundProperty,
                TextBlock.ForegroundProperty,
                TextBlock.FontWeightProperty,
                TextBlock.FontSizeProperty,
                TextBlock.FontStyleProperty);
        }

        private double _computedBaseHeight;
        private AvaloniaList<CInline> _content;
        private Size _constraint;
        private Size _measured;
        private readonly List<CGeometry> _metries;
        private readonly List<LineInfo> _lines;
        private readonly List<CInlineUIContainer> _containers;
        private CGeometry? _entered;
        private CGeometry? _pressed;
        private string? _text;
        private bool _measureRequested;

        private TextPointer? _beginSelect;
        private List<CGeometry> _intermediates = new();
        private TextPointer? _endSelect;


        public Selection? Selection =>
            _beginSelect is not null && _endSelect is not null ?
                new Selection(_beginSelect.Index, _endSelect.Index) :
                null;

        /// <summary>
        /// The brush of background.
        /// </summary>
        public IBrush? Background
        {
            get { return GetValue(BackgroundProperty); }
            set { SetValue(BackgroundProperty, value); }
        }

        /// <summary>
        /// The brush of characters.
        /// </summary>
        public IBrush? Foreground
        {
            get { return GetValue(ForegroundProperty); }
            set { SetValue(ForegroundProperty, value); }
        }

        /// <summary>
        /// The font family of characters
        /// </summary>
        public FontFamily FontFamily
        {
            get { return GetValue(FontFamilyProperty); }
            set { SetValue(FontFamilyProperty, value); }
        }

        /// <summary>
        /// The font size of characters
        /// </summary>
        public double FontSize
        {
            get { return GetValue(FontSizeProperty); }
            set { SetValue(FontSizeProperty, value); }
        }

        /// <summary>
        /// The font style of characters
        /// </summary>
        public FontStyle FontStyle
        {
            get { return GetValue(FontStyleProperty); }
            set { SetValue(FontStyleProperty, value); }
        }

        /// <summary>
        /// The font weight of characters
        /// </summary>
        public FontWeight FontWeight
        {
            get { return GetValue(FontWeightProperty); }
            set { SetValue(FontWeightProperty, value); }
        }

        /// <summary>
        /// Use to indicate the mode of text wrapping.
        /// </summary>
        public TextWrapping TextWrapping
        {
            get { return GetValue(TextWrappingProperty); }
            set { SetValue(TextWrappingProperty, value); }
        }

        /// <summary>
        /// Horizontal text alignment.
        /// </summary>
        public TextAlignment TextAlignment
        {
            get { return GetValue(TextAlignmentProperty); }
            set { SetValue(TextAlignmentProperty, value); }
        }

        /// <summary>
        /// Use to indicate the vertical position of text within line.
        /// For example, it is used to align text to the top or to the bottom.
        /// </summary>
        public TextVerticalAlignment TextVerticalAlignment
        {
            get { return GetValue(TextVerticalAlignmentProperty); }
            set { SetValue(TextVerticalAlignmentProperty, value); }
        }

        /// <summary>
        /// Use to indicate the height of each lines. If this value is NaN, the height is calculated by content.
        /// </summary>
        public double LineHeight
        {
            get { return GetValue(LineHeightProperty); }
            set { SetValue(LineHeightProperty, value); }
        }

        /// <summary>
        /// Line to line spacing.
        /// </summary>
        public double LineSpacing
        {
            get { return GetValue(LineSpacingProperty); }
            set { SetValue(LineSpacingProperty, value); }
        }

        /// <summary>
        /// Contents to be displayed.
        /// </summary>
        [Content]
        public AvaloniaList<CInline> Content
        {

            get => _content;
            set
            {
                var olds = _content;

                if (SetAndRaise(ContentProperty, ref _content, value))
                {
                    olds.CollectionChanged -= ContentCollectionChangedd;

                    DetachChildren(olds);
                    AttachChildren(_content);

                    _content.CollectionChanged += ContentCollectionChangedd;
                }
            }
        }

        /// <summary>
        /// Textual presentation of content.
        /// </summary>
        public string Text
        {
            get => _text ??= String.Join("", Content.Select(c => c.AsString()));
        }

        public IBrush? SelectionBrush
        {
            get => GetValue(SelectionBrushProperty);
            set => SetValue(SelectionBrushProperty, value);
        }


        public CTextBlock()
        {
            _content = new AvaloniaList<CInline>();
            _content.CollectionChanged += ContentCollectionChangedd;

            _metries = new List<CGeometry>();
            _lines = new List<LineInfo>();
            _containers = new List<CInlineUIContainer>();

            RenderOptions.SetBitmapInterpolationMode(this, BitmapInterpolationMode.HighQuality);
        }

        public CTextBlock(string text) : this()
        {
            _content.Add(new CRun() { Text = text });
        }

        public CTextBlock(params CInline[] inlines) : this((IEnumerable<CInline>)inlines)
        {
        }

        public CTextBlock(IEnumerable<CInline> inlines) : this()
        {
            _content.AddRange(inlines);
        }

        #region pointer event

        protected override void OnPointerExited(PointerEventArgs e)
        {
            base.OnPointerExited(e);

            if (_entered is not null)
            {
                _entered.OnMouseLeave?.Invoke(this);
                _entered = null;
            }
        }

        protected override void OnPointerMoved(PointerEventArgs e)
        {
            base.OnPointerMoved(e);

            Point point = e.GetPosition(this);

            if (_entered is not null)
            {
                var relX = point.X - _entered.Left;
                var relY = point.Y - _entered.Top;

                if (!isEntered(_entered))
                {
                    _entered.OnMouseLeave?.Invoke(this);
                    _entered = null;
                }
                else return;
            }

            foreach (CGeometry metry in _metries)
            {
                if (isEntered(metry))
                {
                    metry.OnMouseEnter?.Invoke(this);
                    _entered = metry;
                    break;
                }
            }

            bool isEntered(CGeometry metry)
            {
                var relX = point.X - metry.Left;
                var relY = point.Y - metry.Top;

                return 0 <= relX && relX <= metry.Width
                    && 0 <= relY && relY <= metry.Height;
            }
        }

        protected override void OnPointerPressed(PointerPressedEventArgs e)
        {
            base.OnPointerPressed(e);
            if (e.GetCurrentPoint(this).Properties.IsLeftButtonPressed)
            {
                Point point = e.GetPosition(this);

                foreach (CGeometry metry in _metries)
                {
                    if ((metry.OnMousePressed is not null || metry.OnMouseReleased is not null) && isEntered(metry))
                    {
                        metry.OnMousePressed?.Invoke(this);
                        _pressed = metry;
                        e.Handled = true;
                        return;
                    }
                }

                bool isEntered(CGeometry metry)
                {
                    var relX = point.X - metry.Left;
                    var relY = point.Y - metry.Top;

                    return 0 <= relX && relX <= metry.Width
                        && 0 <= relY && relY <= metry.Height;
                }
            }
        }

        protected override void OnPointerReleased(PointerReleasedEventArgs e)
        {
            base.OnPointerReleased(e);

            if (_pressed is not null && e.InitialPressMouseButton == MouseButton.Left)
            {
                e.Handled = true;
                _pressed.OnMouseReleased?.Invoke(this);

                Point point = e.GetPosition(this);
                var relX = point.X - _pressed.Left;
                var relY = point.Y - _pressed.Top;

                if (0 <= relX && relX <= _pressed.Width
                    && 0 <= relY && relY <= _pressed.Height)
                {
                    _pressed.OnClick?.Invoke(this);
                }

                _pressed = null;
            }
        }

        #endregion

        protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
        {
            base.OnPropertyChanged(change);

            switch (change.Property.Name)
            {
                case nameof(Content):
                case nameof(TextBlock.FontSize):
                case nameof(TextBlock.FontStyle):
                case nameof(TextBlock.FontWeight):
                case nameof(TextWrapping):
                case nameof(Bounds):
                case nameof(TextVerticalAlignment):
                case nameof(LineHeight):
                case nameof(LineSpacing):
                    OnMeasureSourceChanged();
                    break;

                case nameof(BaseHeightProperty):
                    if (_computedBaseHeight != GetValue(BaseHeightProperty))
                    {
                        _measureRequested = true;
                        InvalidateMeasure();
                        InvalidateArrange();
                    }
                    break;
            }
        }

        public void ObserveBaseHeightOf(CTextBlock target)
        {
            if (target is not null)
                this.Bind(BaseHeightProperty, target.GetBindingObservable(BaseHeightProperty));
        }

        private void ContentCollectionChangedd(object? sender, NotifyCollectionChangedEventArgs e)
        {
            switch (e.Action)
            {
                case NotifyCollectionChangedAction.Reset:
                case NotifyCollectionChangedAction.Remove:
                    if (e.OldItems is not null)
                        DetachChildren(e.OldItems.Cast<CInline>());
                    break;

                case NotifyCollectionChangedAction.Replace:
                    if (e.OldItems is not null)
                        DetachChildren(e.OldItems.Cast<CInline>());

                    if (e.NewItems is not null)
                        AttachChildren(e.NewItems.Cast<CInline>());
                    break;

                case NotifyCollectionChangedAction.Add:
                    if (e.NewItems is not null)
                        AttachChildren(e.NewItems.Cast<CInline>());
                    break;
            }
        }

        /// <summary>
        /// Add CInline to LogicalChildren to inherit the value of AvaloniaProperty.
        /// And add Control, which is haved by CInlineUIContainer, to VisualChildren.
        /// </summary>
        private void AttachChildren(IEnumerable<CInline> newItems)
        {
            foreach (CInline item in newItems)
            {
                LogicalChildren.Add(item);
                AttachForVisual(item);
            }

            void AttachForVisual(CInline item)
            {
                if (item is CInlineUIContainer container)
                {
                    var content = container.Content;

                    var visparent = container.Content.GetVisualParent();
                    if (visparent is CTextBlock cblock)
                    {
                        cblock.VisualChildren.Remove(content);
                        cblock.LogicalChildren.Remove(content);
                    }
                    else if (visparent is object)
                    {
                        Debug.Print("Control has another parent");
                        return;
                    }

                    VisualChildren.Add(container.Content);
                    LogicalChildren.Add(container.Content);

                    _containers.Add(container);
                }
                else if (item is CSpan span)
                    foreach (var child in span.Content)
                        AttachForVisual(child);
            }
        }

        /// <summary>
        /// Remove CInline to LogicalChildren to inherit the value of AvaloniaProperty.
        /// And remove Control, which is haved by CInlineUIContainer, to VisualChildren.
        /// </summary>
        private void DetachChildren(IEnumerable<CInline> removeItems)
        {
            foreach (CInline item in removeItems)
            {
                LogicalChildren.Remove(item);
                DetachForVisual(item);
            }

            void DetachForVisual(CInline item)
            {
                if (item is CInlineUIContainer container)
                {
                    VisualChildren.Remove(container.Content);
                    LogicalChildren.Remove(container.Content);

                    _containers.Remove(container);
                }
                else if (item is CSpan span)
                    foreach (var child in span.Content)
                        DetachForVisual(child);
            }
        }

        internal void OnMeasureSourceChanged()
        {
            SetValue(BaseHeightProperty, default);
            _measureRequested = true;
            InvalidateMeasure();
            InvalidateArrange();
        }

        private void RepaintRequested()
        {
            InvalidateVisual();
        }

        /// <summary>
        /// Check to see if the arrangement size is different from the size of measuring.
        /// </summary>
        // 配置領域が寸法計算時に与えられた領域より広すぎるもしくは狭すぎないか確認します。
        protected override Size ArrangeOverride(Size finalSize)
        {
            if (_measured.Width > finalSize.Width)
            {
                finalSize = finalSize.WithWidth(Math.Ceiling(_measured.Width));
            }
            foreach (var container in _containers)
            {
                var indicator = container.Indicator;
                if (indicator is null) continue;

                indicator.Control.Arrange(new Rect(indicator.Left, indicator.Top, indicator.Width, indicator.Height));
            }
            if (AreClose(_constraint.Width, finalSize.Width))
            {
                return finalSize;
            }

            _constraint = new Size(finalSize.Width, Double.PositiveInfinity);
            _measured = UpdateGeometry();

            return finalSize;
        }

        protected override Size MeasureOverride(Size availableSize)
        {
            if (_measured.Width == 0d || !AreClose(availableSize.Width, _constraint.Width) || _measureRequested)
            {
                _measureRequested = false;
                _constraint = availableSize;
                _measured = UpdateGeometry();
            }

            InvalidateArrange();

            return _measured;
        }

        private static bool AreClose(double v1, double v2)
        {
            if (v1 == v2) return true;
            double eps = (Math.Abs(v1) + Math.Abs(v2) + 10.0) * 2.2204460492503131e-016;
            double diff = Math.Abs(v1 - v2);
            return diff < eps;
        }

        private Size UpdateGeometry()
        {
            _metries.Clear();
            _lines.Clear();

            double entireWidth = _constraint.Width;
            if (Double.IsInfinity(_constraint.Width) && Bounds.Width != 0)
                entireWidth = Bounds.Width;


            double width = 0;
            double height = 0;

            // measure & split by linebreak
            var reqHeight = GetValue(BaseHeightProperty);
            var entireLineHeight = LineHeight;
            {
                LineInfo? now = null;

                double remainWidth = entireWidth;

                foreach (CInline inline in Content)
                {
                    IEnumerable<CGeometry> inlineGeometry =
                        inline.Measure(
                            (TextWrapping == TextWrapping.NoWrap) ? Double.PositiveInfinity : entireWidth,
                            (TextWrapping == TextWrapping.NoWrap) ? Double.PositiveInfinity : remainWidth);

                    foreach (CGeometry metry in inlineGeometry)
                    {
                        if (now is null)
                        {
                            _lines.Add(now = new LineInfo());
                            if (_lines.Count == 1)
                                now.RequestBaseHeight = reqHeight;
                        }

                        if (now.Add(metry))
                        {
                            if (!Double.IsNaN(entireLineHeight))
                                now.OverwriteHeight(entireLineHeight);

                            width = Math.Max(width, now.Width);
                            height += now.Height;

                            now = null;
                            remainWidth = entireWidth;
                        }
                        else remainWidth -= metry.Width;
                    }
                }

                if (now is not null)
                {
                    if (!Double.IsNaN(entireLineHeight))
                        now.OverwriteHeight(entireLineHeight);

                    width = Math.Max(width, now.Width);
                    height += now.Height;
                }
            }

            if (_lines.Count > 0)
            {
                _computedBaseHeight = _lines[0].BaseHeight;
                SetValue(BaseHeightProperty, _lines[0].BaseHeight);
            }

            var lineSpc = LineSpacing;
            height += lineSpc * (_lines.Count - 1);

            // set position
            {
                var topOffset = 0d;
                var leftOffset = 0d;

                foreach (LineInfo lineInf in _lines)
                {
                    lineInf.Top = topOffset;

                    switch (TextAlignment)
                    {
                        case TextAlignment.Left:
                            leftOffset = 0d;
                            break;
                        case TextAlignment.Center:
                            leftOffset = (entireWidth - lineInf.Width) / 2;
                            break;
                        case TextAlignment.Right:
                            leftOffset = entireWidth - lineInf.Width;
                            break;
                    }

                    foreach (CGeometry metry in lineInf.Metries)
                    {
                        metry.Left = leftOffset;
                        switch (metry.TextVerticalAlignment)
                        {
                            case TextVerticalAlignment.Top:
                                metry.Top = topOffset;
                                break;
                            case TextVerticalAlignment.Center:
                                metry.Top = topOffset + (lineInf.Height - metry.Height) / 2;
                                break;
                            case TextVerticalAlignment.Bottom:
                                metry.Top = topOffset + lineInf.Height - metry.Height;
                                break;
                            case TextVerticalAlignment.Base:
                                metry.Top = topOffset + lineInf.BaseHeight - metry.BaseHeight;
                                break;
                        }

                        leftOffset += metry.Width;

                        _metries.Add(metry);
                        metry.Arranged();
                    }

                    topOffset += lineInf.Height + lineSpc;
                }
            }

            foreach (CGeometry metry in _metries) metry.RepaintRequested += RepaintRequested;

            if (_beginSelect is not null && _endSelect is not null)
            {
                Select(_beginSelect.Index, _endSelect.Index);
            }

            return new Size(width, height);
        }

        public override void Render(DrawingContext context)
        {
            if (Background is not null)
            {
                context.FillRectangle(Background, new Rect(0, 0, Bounds.Width, Bounds.Height));
            }

            IBrush select = SelectionBrush ?? Brushes.Cyan;
            List<Rect>? fillAfter = null;

            if (_beginSelect is not null && _endSelect is not null)
            {
                fillAfter = new List<Rect>();

                TextPointer bgn, end;
                if (_beginSelect < _endSelect)
                {
                    bgn = _beginSelect;
                    end = _endSelect;
                }
                else
                {
                    bgn = _endSelect;
                    end = _beginSelect;
                }


                if (ReferenceEquals(bgn.Geometry, end.Geometry))
                {
                    var rct = new Rect(
                        bgn.Geometry.Left + bgn.Distance,
                        bgn.Geometry.Top,
                        end.Distance - bgn.Distance,
                        bgn.Geometry.Height);

                    TryRender(bgn.Geometry, rct);
                }
                else
                {
                    TryRender(bgn.Geometry, new Rect(bgn.Geometry.Left + bgn.Distance, bgn.Geometry.Top, bgn.Geometry.Width - bgn.Distance, bgn.Geometry.Height));

                    foreach (var inter in _intermediates)
                    {
                        TryRender(inter, new Rect(inter.Left, inter.Top, inter.Width, inter.Height));
                    }

                    TryRender(end.Geometry, new Rect(end.Geometry.Left, end.Geometry.Top, end.Distance, end.Geometry.Height));
                }

                void TryRender(CGeometry metry, Rect rct)
                {
                    if (metry is TextGeometry)
                    {
                        context.FillRectangle(select, rct);
                    }
                    else
                    {
                        fillAfter.Add(rct);
                    }
                }
            }

            foreach (var metry in _metries)
            {
                metry.Render(context);
            }

            if (fillAfter is not null)
            {
                if (select is ISolidColorBrush colorBrush)
                {
                    var selectFill = new SolidColorBrush(colorBrush.Color, .5);
                    foreach (var fillRct in fillAfter)
                    {
                        context.FillRectangle(selectFill, fillRct);
                    }
                }
                else
                {
                    foreach (var fillRct in fillAfter)
                    {
                        var pen = new Pen(select, 2);
                        var rct = new Rect(fillRct.Left - 1, fillRct.Top - 1, fillRct.Width + 2, fillRct.Height + 2);
                        context.DrawRectangle(pen, rct);
                    }
                }
            }
        }

        protected override AutomationPeer OnCreateAutomationPeer()
        {
            return new CTextBlockAutomationPeer(this);
        }

        public void Select(int begin, int end)
        {
            int beginBack = begin;
            int endBack = end;
            for (var i = 0; i < _metries.Count; ++i)
            {
                var metry = _metries[i];
                var caretLength = metry.CaretLength;

                if (begin < caretLength || (i == _metries.Count - 1 && begin == caretLength))
                {
                    _beginSelect = metry.CalcuatePointerFrom(begin).Wrap(this, beginBack - begin);
                    begin = Int32.MaxValue;
                }
                else begin -= caretLength;

                if (end < caretLength || (i == _metries.Count - 1 && end == caretLength))
                {
                    _endSelect = metry.CalcuatePointerFrom(end).Wrap(this, endBack - end);
                    if (endBack != _endSelect.Index)
                        throw new Exception();
                    end = Int32.MaxValue;
                }
                else end -= caretLength;
            }
            ComplementIntermediate();
            InvalidateVisual();
        }

        public void Select(TextPointer begin, TextPointer end)
        {
            _beginSelect = begin;
            _endSelect = end;
            ComplementIntermediate();
            InvalidateVisual();
        }

        private void ComplementIntermediate()
        {
            bool bgn = false;
            bool end = false;

            _intermediates.Clear();
            foreach (var metry in _metries)
            {
                bool hitB = false;
                bool hitE = false;
                bgn |= (hitB = ReferenceEquals(metry, _beginSelect.Geometry));
                end |= (hitE = ReferenceEquals(metry, _endSelect.Geometry));

                if (bgn && end) break;

                if (hitB | hitE) continue;

                if (bgn | end)
                {
                    _intermediates.Add(metry);
                }
            }
        }


        public void ClearSelection()
        {
            _beginSelect = null;
            _endSelect = null;
            _intermediates.Clear();
            InvalidateVisual();
        }

        public TextPointer CalcuatePointerFrom(double x, double y)
        {
            if (y < 0)
            {
                return GetBegin();
            }

            int indexAdd = 0;
            foreach (var line in _lines)
            {
                if (y <= line.Top + line.Height)
                {
                    foreach (var target in line.Metries)
                    {
                        if (x <= target.Left + target.Width)
                        {
                            return target.CalcuatePointerFrom(x, y)
                                         .Wrap(this, indexAdd);
                        }
                        else
                        {
                            indexAdd += target.CaretLength;
                        }
                    }
                }
                else
                {
                    indexAdd += line.Metries.Sum(t => t.CaretLength);
                }
            }

            return GetEnd();
        }

        public TextPointer CalcuatePointerFrom(int index)
        {
            if (index < 0)
                throw new ArgumentOutOfRangeException(nameof(index));

            foreach (var metry in _metries)
            {
                var caretLength = metry.CaretLength;

                if (index < caretLength)
                {
                    return metry.CalcuatePointerFrom(index);
                }
                else index -= caretLength;
            }

            throw new ArgumentOutOfRangeException(nameof(index));
        }

        public TextPointer GetBegin()
        {
            if (_metries.Count != 0)
            {
                return _metries[0].GetBegin().Wrap(this, 0);
            }
            else
            {
                return new TextPointer(this, 0);
            }
        }

        public TextPointer GetEnd()
        {
            if (_metries.Count != 0)
            {
                var pointer = _metries[_metries.Count - 1].GetEnd();

                int indexAdd = _metries.Take(_metries.Count - 1).Sum(t => t.CaretLength);
                return pointer.Wrap(this, indexAdd);
            }
            else
            {
                return new TextPointer(this, 0);
            }
        }

        public string GetSelectedText()
        {
            if (_beginSelect is null || _endSelect is null)
            {
                return string.Empty;
            }

            TextPointer bgn, end;
            if (_beginSelect < _endSelect)
            {
                bgn = _beginSelect;
                end = _endSelect;
            }
            else
            {
                bgn = _endSelect;
                end = _beginSelect;
            }

            if (ReferenceEquals(bgn.Geometry, end.Geometry))
            {
                if (bgn.Geometry is TextLineGeometry tlg)
                {
                    return tlg.Text.Substring(bgn.InternalIndex, end.InternalIndex - bgn.InternalIndex);
                }
                else return "";
            }
            else
            {
                var buffer = new StringBuilder();

                if (bgn.Geometry is TextLineGeometry btlg)
                    buffer.Append(btlg.Text.Substring(bgn.InternalIndex));

                foreach (var inter in _intermediates)
                {
                    if (inter is TextLineGeometry itlg)
                        buffer.Append(itlg.ToString());
                }

                if (end.Geometry is TextLineGeometry etlg)
                    buffer.Append(etlg.Text.Substring(etlg.Line.FirstTextSourceIndex, end.InternalIndex - etlg.Line.FirstTextSourceIndex));

                return buffer.ToString();
            }
        }
    }




    public class Selection
    {
        public int From { get; }
        public int To { get; }
        public Selection(int f, int t)
        {
            From = f;
            To = t;
        }
    }

    class LineInfo
    {
        public List<CGeometry> Metries = new();

        public double RequestBaseHeight;
        private double BaseHeight1;
        private double BaseHeight2;

        private double _height;
        private double _dheightTop;
        private double _dheightBtm;

        public double Top { get; internal set; }
        public double Width { private set; get; }
        public double Height => Math.Max(_height, _dheightTop + _dheightBtm);
        public double BaseHeight => Math.Max(RequestBaseHeight, BaseHeight1 != 0 ? BaseHeight1 : BaseHeight2);

        public bool Add(CGeometry metry)
        {
            Metries.Add(metry);

            Width += metry.Width;

            switch (metry.TextVerticalAlignment)
            {
                case TextVerticalAlignment.Base:
                    Max(ref BaseHeight1, metry.BaseHeight);
                    Max(ref _dheightTop, metry.BaseHeight);
                    Max(ref _dheightBtm, metry.Height - metry.BaseHeight);
                    break;

                case TextVerticalAlignment.Top:
                    Max(ref BaseHeight1, metry.BaseHeight);
                    Max(ref _height, metry.Height);
                    break;

                case TextVerticalAlignment.Center:
                    Max(ref BaseHeight1, metry.Height / 2);
                    Max(ref _height, metry.Height);
                    break;

                case TextVerticalAlignment.Bottom:
                    Max(ref BaseHeight2, metry.BaseHeight);
                    Max(ref _height, metry.Height);
                    break;

                default:
                    Throw("sorry library manager forget to modify.");
                    break;
            }

            return metry.LineBreak;
        }

        public void OverwriteHeight(double height)
        {
            _height = height;
            _dheightBtm = _dheightTop = 0;
        }

        private static void Max(ref double v1, double v2) => v1 = Math.Max(v1, v2);
        private static void Throw(string msg) => throw new InvalidOperationException(msg);
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CTextBlockAutomationPeer.cs
================================================
using Avalonia.Automation.Peers;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// The automation peer for CTextBlock.
    /// </summary>
    public class CTextBlockAutomationPeer : ControlAutomationPeer
    {
        public CTextBlockAutomationPeer(CTextBlock owner) : base(owner)
        { }

        public new CTextBlock Owner
            => (CTextBlock)base.Owner;

        protected override AutomationControlType GetAutomationControlTypeCore()
            => AutomationControlType.Text;

        protected override string? GetNameCore()
            => Owner.Text;

        protected override bool IsControlElementCore()
            => Owner.TemplatedParent is null && base.IsControlElementCore();
    }
}


================================================
FILE: ColorTextBlock.Avalonia/CUnderline.cs
================================================
using System.Collections.Generic;

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// Underline decoration
    /// </summary>
    public class CUnderline : CSpan
    {
        public CUnderline() { }

        public CUnderline(IEnumerable<CInline> inlines) : base(inlines)
        {
            IsUnderline = true;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/ColorTextBlock.Avalonia.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\Markdown.Avalonia.props" />

  <PropertyGroup>
    <OutputType>Library</OutputType>
    <TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
    <PackageId>ColorTextBlock.Avalonia</PackageId>
    <Version>$(PackageVersion)</Version>
    <Authors>whistyun</Authors>
    <Copyright>Copyright (c) 2020 whistyun</Copyright>
    <PackageProjectUrl>https://github.com/whistyun/Markdown.Avalonia/tree/master/ColorTextBlock.Avalonia/</PackageProjectUrl>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <LangVersion>9</LangVersion>
    <Nullable>enable</Nullable>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="Avalonia" Version="$(AvaloniaVersion)" />
  </ItemGroup>

</Project>


================================================
FILE: ColorTextBlock.Avalonia/Fonts/FontFamilyCollector.cs
================================================
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ColorTextBlock.Avalonia.Fonts
{
    internal class FontFamilyCollector
    {
        public static FontFamily? TryGetMonospace()
        {
            string[] RequestFamilies = {
                "menlo",
                "monaco",
                "consolas",
                "droid sans mono",
                "inconsolata",
                "courier new",
                "monospace",
                "dejavu sans mono",
            };

            var monospaceName = FontManager.Current.SystemFonts
                                           .Where(family => RequestFamilies.Any(reqNm => family.Name.ToLower().Contains(reqNm)))
                                           .FirstOrDefault();

            return monospaceName;
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/CGeometry.cs
================================================
using Avalonia.Controls;
using Avalonia.Media;
using System;
using System.Diagnostics.CodeAnalysis;

namespace ColorTextBlock.Avalonia.Geometries
{
    public abstract class CGeometry : ITextPointerHandleable
    {
        public CInline Owner { get; }
        public double Left { get; set; }
        public double Top { get; set; }
        public double Width { get; }
        public double Height { get; }
        public double BaseHeight { get; }
        public bool LineBreak { get; }
        public TextVerticalAlignment TextVerticalAlignment { get; }

        public event Action? RepaintRequested;

        public virtual Action<Control>? OnMouseEnter { get; set; }
        public virtual Action<Control>? OnMouseLeave { get; set; }
        public virtual Action<Control>? OnMousePressed { get; set; }
        public virtual Action<Control>? OnMouseReleased { get; set; }
        public virtual Action<Control>? OnClick { get; set; }

        private int? _caretLength;

        public CGeometry(
            CInline owner,
            double width, double height, double baseHeight,
            TextVerticalAlignment textVerticalAlignment,
            bool linebreak)
        {
            this.Owner = owner;
            this.Width = width;
            this.Height = height;
            this.BaseHeight = baseHeight;
            this.TextVerticalAlignment = textVerticalAlignment;
            this.LineBreak = linebreak;
        }

        public abstract void Render(DrawingContext ctx);

        internal void RequestRepaint() => RepaintRequested?.Invoke();

        public abstract TextPointer CalcuatePointerFrom(int index);
        public abstract TextPointer CalcuatePointerFrom(double x, double y);
        public abstract TextPointer GetBegin();
        public abstract TextPointer GetEnd();

        public virtual void Arranged() { }


        public virtual int CaretLength
        {
            get
            {
                if (!_caretLength.HasValue)
                    _caretLength = GetEnd().Index - GetBegin().Index;

                return _caretLength.Value;
            }
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/DecoratorGeometry.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Media;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using static System.Net.Mime.MediaTypeNames;

namespace ColorTextBlock.Avalonia.Geometries
{
    public class DecoratorGeometry : CGeometry
    {
        public CGeometry[] Targets { get; }
        public Border Decorate { get; }

        private Action<Control>? _OnMouseEnter;
        private Action<Control>? _OnMouseLeave;
        private Action<Control>? _OnMousePressed;
        private Action<Control>? _OnMouseReleased;
        private Action<Control>? _OnClick;

        public override Action<Control>? OnMouseEnter
        {
            get => ctrl =>
            {
                _OnMouseEnter?.Invoke(ctrl);
                foreach (var target in Targets)
                    target.OnMouseEnter?.Invoke(ctrl);
            };
            set => _OnMouseEnter = value;
        }
        public override Action<Control>? OnMouseLeave
        {
            get => ctrl =>
            {
                _OnMouseLeave?.Invoke(ctrl);
                foreach (var target in Targets)
                    target.OnMouseLeave?.Invoke(ctrl);
            };
            set => _OnMouseLeave = value;
        }
        public override Action<Control>? OnMousePressed
        {
            get => ctrl =>
            {
                _OnMousePressed?.Invoke(ctrl);
                foreach (var target in Targets)
                    target.OnMousePressed?.Invoke(ctrl);
            };
            set => _OnMousePressed = value;
        }
        public override Action<Control>? OnMouseReleased
        {
            get => ctrl =>
            {
                _OnMouseReleased?.Invoke(ctrl);
                foreach (var target in Targets)
                    target.OnMouseReleased?.Invoke(ctrl);
            };
            set => _OnMouseReleased = value;
        }
        public override Action<Control>? OnClick
        {
            get => ctrl =>
            {
                _OnClick?.Invoke(ctrl);
                foreach (var target in Targets)
                    target.OnClick?.Invoke(ctrl);
            };
            set => _OnClick = value;
        }

        internal static DecoratorGeometry New(
            CSpan owner,
            IEnumerable<CGeometry> oneline,
            Border decorate)
        {
            double width = 0;
            double height = 0;

            double descentHeightTop = 0;
            double descentHeightBtm = 0;

            double baseHeight = 0;
            double baseHeight2 = 0;

            void Max(ref double v1, double v2) => v1 = Math.Max(v1, v2);

            foreach (var one in oneline)
            {
                width += one.Width;

                switch (one.TextVerticalAlignment)
                {
                    case TextVerticalAlignment.Base:
                        Max(ref baseHeight, one.BaseHeight);

                        Max(ref descentHeightTop, one.BaseHeight);
                        Max(ref descentHeightBtm, one.Height - one.BaseHeight);
                        break;

                    case TextVerticalAlignment.Top:
                        Max(ref baseHeight, one.BaseHeight);
                        Max(ref height, one.Height);
                        break;

                    case TextVerticalAlignment.Center:
                        Max(ref baseHeight, one.Height / 2);
                        Max(ref height, one.Height);
                        break;

                    case TextVerticalAlignment.Bottom:
                        Max(ref baseHeight2, one.BaseHeight);
                        Max(ref height, one.Height);
                        break;

                    default:
                        throw new InvalidOperationException("sorry library manager forget to modify.");
                }

            }

            Max(ref height, descentHeightTop + descentHeightBtm);

            baseHeight = baseHeight != 0 ? baseHeight : baseHeight2;

            return new DecoratorGeometry(
                width + decorate.DesiredSize.Width,
                height + decorate.DesiredSize.Height,
                baseHeight + decorate.Margin.Top + decorate.BorderThickness.Top + decorate.Padding.Top,
                owner,
                oneline.ToArray(),
                decorate);
        }

        private DecoratorGeometry(
            double w, double h, double lh,
            CSpan owner,
            CGeometry[] targets,
            Border decorate) : base(
                owner,
                w, h, lh,
                owner.TextVerticalAlignment,
                targets[targets.Length - 1].LineBreak)
        {
            this.Targets = targets;
            this.Decorate = decorate;
        }

        public override void Arranged()
        {
            var left = Left + Decorate.BorderThickness.Left + Decorate.Padding.Left + Decorate.Margin.Left;
            var top = Top + Decorate.BorderThickness.Top + Decorate.Padding.Top + Decorate.Margin.Top;
            var btm = Top + Height - Decorate.BorderThickness.Bottom - Decorate.Padding.Bottom - Decorate.Margin.Bottom;

            foreach (var target in Targets)
            {
                target.Left = left;

                target.Top = target.TextVerticalAlignment switch
                {
                    TextVerticalAlignment.Top
                        => top,

                    TextVerticalAlignment.Center
                        => (top + btm - target.Height) / 2,

                    TextVerticalAlignment.Bottom
                        => btm - target.Height,

                    TextVerticalAlignment.Base
                        => Top + BaseHeight - target.BaseHeight,

                    _ => throw new InvalidOperationException("sorry library manager forget to modify.")
                };

                left += target.Width;

                target.Arranged();
            }
        }

        public override void Render(DrawingContext ctx)
        {
            using (ctx.PushTransform(Matrix.CreateTranslation(Left + Decorate.Margin.Left, Top + Decorate.Margin.Top)))
            {
                Decorate.Background = Owner.Background;
                Decorate.Arrange(new Rect(0, 0, Width, Height));
                Decorate.Render(ctx);

            }

            foreach (var target in Targets)
                target.Render(ctx);
        }

        public override TextPointer CalcuatePointerFrom(double x, double y)
        {
            if (x < Left)
            {
                return GetBegin();
            }

            int indexAdd = 0;
            foreach (var target in Targets.Take(Targets.Length - 1))
            {
                if (x <= target.Left + target.Width)
                {
                    return target.CalcuatePointerFrom(x, y)
                                 .Wrap(Owner, indexAdd);
                }
                else
                {
                    indexAdd += target.CaretLength;
                }
            }

            return Targets[Targets.Length - 1].GetEnd().Wrap(Owner, indexAdd);
        }

        public override TextPointer CalcuatePointerFrom(int index)
        {
            if (index < 0)
                throw new ArgumentOutOfRangeException(nameof(index));

            int relindex = index;
            foreach (var target in Targets)
            {
                if (relindex < target.CaretLength)
                {
                    return target.CalcuatePointerFrom(relindex)
                                 .Wrap(Owner, index - relindex);
                }

                relindex -= target.CaretLength;
            }

            throw new ArgumentOutOfRangeException(nameof(index));
        }


        public override TextPointer GetBegin()
        {
            var pointer = Targets[0].GetBegin();
            return pointer.Wrap(Owner, 0);
        }

        public override TextPointer GetEnd()
        {
            var pointer = Targets[Targets.Length - 1].GetEnd();

            int indexAdd = Targets.Take(Targets.Length - 1).Sum(t => t.CaretLength);
            return pointer.Wrap(Owner, indexAdd);
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/DummyGeometryForControl.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Controls.Documents;
using Avalonia.Media;
using ColorTextBlock.Avalonia.Geometries;
using System;
using static System.Net.Mime.MediaTypeNames;

namespace ColorTextBlock.Avalonia.Geometies
{
    internal class DummyGeometryForControl : CGeometry
    {
        public Control Control { get; }

        public DummyGeometryForControl(CInlineUIContainer owner, Control control, TextVerticalAlignment alignment) :
            base(
                owner,
                control.DesiredSize.Width,
                control.DesiredSize.Height,
                control.DesiredSize.Height,
                alignment,
                false)
        {
            Control = control;
        }

        public override void Render(DrawingContext ctx)
        {
        }

        public override TextPointer CalcuatePointerFrom(double x, double y)
        {
            if (x < Left + Width / 2)
            {
                return GetBegin();
            }
            else
            {
                return GetEnd();
            }
        }

        public override TextPointer CalcuatePointerFrom(int index)
        {
            return index switch
            {
                0 => GetBegin(),
                1 => GetEnd(),
                _ => throw new ArgumentOutOfRangeException(nameof(index))
            };
        }

        public override TextPointer GetBegin()
        {
            return new TextPointer(this);
        }

        public override TextPointer GetEnd()
        {
            return new TextPointer(this, 1, Width);
        }
    }
}

================================================
FILE: ColorTextBlock.Avalonia/Geometies/ImageGeometry.cs
================================================
using Avalonia;
using Avalonia.Media;
using Avalonia.Media.Imaging;
using System;
using System.Diagnostics.CodeAnalysis;

namespace ColorTextBlock.Avalonia.Geometries
{
    public class ImageGeometry : CGeometry
    {
        public new double Width { get; }
        public new double Height { get; }
        public IImage Image { get; }

        internal ImageGeometry(
            CImage owner,
            IImage image, double width, double height,
            TextVerticalAlignment alignment) :
            base(owner, width, height, height, alignment, false)
        {
            this.Image = image;
            this.Width = width;
            this.Height = height;
        }

        public override void Render(DrawingContext ctx)
        {
            ctx.DrawImage(
                Image,
                new Rect(Image.Size),
                new Rect(Left, Top, Width, Height));
        }

        public override TextPointer CalcuatePointerFrom(double x, double y)
        {
            if (x < Left + Width / 2)
            {
                return GetBegin();
            }
            else
            {
                return GetEnd();
            }
        }
        public override TextPointer CalcuatePointerFrom(int index)
        {
            return index switch
            {
                0 => GetBegin(),
                1 => GetEnd(),
                _ => throw new ArgumentOutOfRangeException(nameof(index))
            };
        }
        public override TextPointer GetBegin()
        {
            return new TextPointer(this);
        }

        public override TextPointer GetEnd()
        {
            return new TextPointer(this, 1, Width);
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/LineBreakMarkGeometry.cs
================================================
using Avalonia;
using Avalonia.Controls.Shapes;
using Avalonia.Media;
using Avalonia.Media.TextFormatting;
using System;
using System.Linq;
using static System.Net.Mime.MediaTypeNames;

namespace ColorTextBlock.Avalonia.Geometries
{
    internal class LineBreakMarkGeometry : TextGeometry
    {
        private bool IsDummy { get; }

        internal LineBreakMarkGeometry(
            CInline owner,
            double lineHeight) :
            base(owner, 0, lineHeight, lineHeight, TextVerticalAlignment.Base, true)
        {
            IsDummy = false;
        }

        internal LineBreakMarkGeometry(CInline owner) :
            base(owner, 0, 0, 0, TextVerticalAlignment.Base, true)
        {
            IsDummy = true;
        }

        public override void Render(DrawingContext ctx) { }

        public override TextPointer CalcuatePointerFrom(double x, double y)
        {
            throw new InvalidOperationException();
        }

        public override TextPointer CalcuatePointerFrom(int index)
        {
            return index switch
            {
                0 => GetBegin(),
                1 => GetEnd(),
                _ => throw new ArgumentOutOfRangeException(nameof(index))
            };
        }

        public override TextPointer GetBegin()
        {
            return new TextPointer(this);
        }

        public override TextPointer GetEnd()
        {
            return IsDummy ?
                new TextPointer(this) :
                new TextPointer(this, 1, Width);
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/TextGeometry.cs
================================================
using Avalonia;
using Avalonia.Media;
using Avalonia.Media.TextFormatting;
using System.Linq;

namespace ColorTextBlock.Avalonia.Geometries
{
    internal abstract class TextGeometry : CGeometry
    {
        private IBrush? _TemporaryForeground;
        public IBrush? TemporaryForeground
        {
            get => _TemporaryForeground;
            set => _TemporaryForeground = value;
        }

        private IBrush? _TemporaryBackground;
        public IBrush? TemporaryBackground
        {
            get => _TemporaryBackground;
            set => _TemporaryBackground = value;
        }

        public IBrush? Foreground
        {
            get => Owner?.Foreground;
        }
        public IBrush? Background
        {
            get => Owner?.Background;
        }
        public bool IsUnderline
        {
            get => Owner is null ? false : Owner.IsUnderline;
        }
        public bool IsStrikethrough
        {
            get => Owner is null ? false : Owner.IsStrikethrough;
        }

        internal TextGeometry(
            CInline owner,
            double width, double height, double lineHeight,
            TextVerticalAlignment alignment,
            bool linebreak) :
            base(owner, width, height, lineHeight, alignment, linebreak)
        {
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/Geometies/TextLineGeometry.cs
================================================
using Avalonia;
using Avalonia.Media;
using Avalonia.Media.TextFormatting;
using System;
using System.Diagnostics.CodeAnalysis;
using System.Linq;
using static System.Net.Mime.MediaTypeNames;

namespace ColorTextBlock.Avalonia.Geometries
{
    internal class TextLineGeometry : TextGeometry
    {
        public SimpleTextSource Text { get; private set; }
        public TextLine Line { get; private set; }
        public IBrush? LayoutForeground { get; private set; }

        internal TextLineGeometry(
            CRun owner,
            SimpleTextSource text,
            TextLine tline,
            bool linebreak) :
            base(owner, tline.WidthIncludingTrailingWhitespace, tline.Height, tline.Baseline, owner.TextVerticalAlignment, linebreak)
        {
            Text = text;
            Line = tline;
            LayoutForeground = owner.Foreground;
        }

        public override void Render(DrawingContext ctx)
        {
            var foreground = TemporaryForeground ?? Foreground;
            var background = TemporaryBackground ?? Background;

            if (LayoutForeground != foreground)
            {
                LayoutForeground = foreground;
                Text = Text.ChangeForeground(foreground);

                var owner = (CRun)Owner;
                var parPrps = owner.CreateTextParagraphProperties(Text.RunProperties);

                Line = TextFormatter.Current.FormatLine(
                            Text,
                            Line.FirstTextSourceIndex,
                            Width,
                            parPrps)!;
            }

            if (background != null)
            {
                ctx.FillRectangle(background, new Rect(Left, Top, Width, Height));
            }

            Line.Draw(ctx, new Point(Left, Top));

            if (IsUnderline)
            {
                var ypos = Math.Round(Top + Height);
                ctx.DrawLine(new Pen(foreground, 2),
                    new Point(Left, ypos),
                    new Point(Left + Width, ypos));
            }

            if (IsStrikethrough)
            {
                var ypos = Math.Round(Top + Height / 2);
                ctx.DrawLine(new Pen(foreground, 2),
                    new Point(Left, ypos),
                    new Point(Left + Width, ypos));
            }
        }

        public override TextPointer CalcuatePointerFrom(double x, double y)
        {
            var relX = x - Left;

            if (relX < 0) return GetBegin();
            if (relX >= Width) return GetEnd();

            var hit = Line.GetCharacterHitFromDistance(relX);
            var dst = Line.GetDistanceFromCharacterHit(hit);

            return new TextPointer((CRun)Owner, this, hit, dst, false);
        }
        public override TextPointer CalcuatePointerFrom(int index)
        {
            var hit = new CharacterHit(Line.FirstTextSourceIndex + index);
            var dst = Line.GetDistanceFromCharacterHit(hit);

            return new TextPointer((CRun)Owner, this, hit, dst, false);
        }

        public override TextPointer GetBegin()
        {
            var hit = Line.GetCharacterHitFromDistance(0);

            return new TextPointer((CRun)Owner, this, hit, false);
        }

        public override TextPointer GetEnd()
        {
            var hit = Line.GetCharacterHitFromDistance(Double.MaxValue);

            return new TextPointer((CRun)Owner, this, hit, Width, true);
        }

        public override string ToString()
            => Text.Substring(Line.FirstTextSourceIndex, Line.Length);
    }
}


================================================
FILE: ColorTextBlock.Avalonia/StringToRunConverter.cs
================================================
using System;
using System.ComponentModel;
using System.Globalization;
using System.Text.RegularExpressions;

namespace ColorTextBlock.Avalonia
{
    public class StringToRunConverter : TypeConverter
    {
        public override bool CanConvertFrom(ITypeDescriptorContext? context, Type sourceType)
        {
            return sourceType == typeof(string);
        }

        public override object ConvertFrom(ITypeDescriptorContext? context, CultureInfo? culture, object value)
        {
            var txt = (string)value;
            txt = Regex.Replace(txt, "[\r\n \t]+", " ");
            return new CRun() { Text = String.IsNullOrEmpty(txt) ? " " : txt };
        }
    }
}


================================================
FILE: ColorTextBlock.Avalonia/TextPointer.cs
================================================
using Avalonia.Media;
using ColorTextBlock.Avalonia.Geometries;
using System;
using System.Collections.Generic;
using System.Linq;

namespace ColorTextBlock.Avalonia
{
    public class TextPointer : IEquatable<TextPointer>, IComparable<TextPointer>
    {
        public int Index { get; }
        internal int InternalIndex { get; }
        internal int TrailingLength { get; }
        internal double Distance { get; }
        internal CGeometry Geometry { get; }

        internal int PathDepth => _path.Length;
        internal CInline this[int idx] => _path[idx];

        private CInline[] _path;

        private TextPointer(CInline[] path, CGeometry geometry, int index, int internalIndex, int trallingLength, double distance)
        {
            _path = path;
            Geometry = geometry;
            Index = index;
            InternalIndex = internalIndex;
            TrailingLength = trallingLength;
            Distance = distance;
        }

        internal TextPointer(CRun inline, TextLineGeometry target, CharacterHit charHit, bool isLast)
        {
            _path = new[] { inline };
            Geometry = target;

            if (isLast)
            {
                var lastIdx = charHit.FirstCharacterIndex + charHit.TrailingLength;
                Index = lastIdx - target.Line.FirstTextSourceIndex;
                InternalIndex = lastIdx;
                TrailingLength = 0;
            }
            else
            {
                Index = charHit.FirstCharacterIndex - target.Line.FirstTextSourceIndex;
                InternalIndex = charHit.FirstCharacterIndex;
                TrailingLength = charHit.TrailingLength;
            }
        }

        internal TextPointer(CRun inline, TextLineGeometry target, CharacterHit charHit, double distance, bool isLast) :
            this(inline, target, charHit, isLast)
        {
            Distance = distance;
        }

        internal TextPointer(CGeometry inline)
        {
            _path = new[] { inline.Owner };
            Geometry = inline;
            Index = 0;
            InternalIndex = 0;
            TrailingLength = 0;
        }

        internal TextPointer(CGeometry inline, int idx, double distance)
        {
            _path = new[] { inline.Owner };
            Geometry = inline;
            Index = idx;
            InternalIndex = 0;
            TrailingLength = 0;
            Distance = distance;
        }

        internal TextPointer(CTextBlock host, int idx)
        {
            _path = Array.Empty<CInline>();
            Index = idx;
            InternalIndex = 0;
            TrailingLength = 0;
        }

        internal TextPointer Wrap(CInline owner, int indexAdding)
        {
            var path = new List<CInline>(_path.Length + 1);
            path.Add(owner);
            path.AddRange(_path);

            return new TextPointer(
                path.ToArray(),
                Geometry,
                Index + indexAdding,
                InternalIndex,
                TrailingLength,
                Distance);
        }

        internal TextPointer Wrap(CTextBlock host, int indexAdding)
        {
            return new TextPointer(
                _path,
                Geometry,
                Index + indexAdding,
                InternalIndex,
                TrailingLength,
                Distance);
        }

        public override int GetHashCode()
        {
            return _path.Sum(e => e.GetHashCode())
                + Index.GetHashCode()
                + InternalIndex.GetHashCode()
                + TrailingLength.GetHashCode();
        }

        public bool Equals(TextPointer? other)
        {
            return PathDepth == other.PathDepth
                && Enumerable.Range(0, PathDepth).All(i => Object.ReferenceEquals(_path[i], other[i]))
                && Index == other.Index
                && InternalIndex == other.InternalIndex
                && TrailingLength == other.TrailingLength;
        }

        public int CompareTo(TextPointer? other)
            => other is not null ? Index.CompareTo(other.Index) : throw new ArgumentNullException(nameof(other));

        public static bool operator <(TextPointer left, TextPointer right) => left.CompareTo(right) < 0;
        public static bool operator >(TextPointer left, TextPointer right) => left.CompareTo(right) > 0;

        public static bool operator <=(TextPointer left, TextPointer right) => left.CompareTo(right) <= 0;
        public static bool operator >=(TextPointer left, TextPointer right) => left.CompareTo(right) >= 0;
    }

    public interface ITextPointerHandleable
    {
        /// <summary>
        /// Calcuates position from relative coordinates. 
        /// The origin of the relative coordinates is based on CTextBlock.
        /// </summary>
        /// <param name="x">The x coordinate of caret position on CTextBlock</param>
        /// <param name="y">The y coordinate of caret position on CTextBlock</param>
        /// <returns></returns>
        public TextPointer CalcuatePointerFrom(double x, double y);

        public TextPointer CalcuatePointerFrom(int index);

        public TextPointer GetBegin();

        public TextPointer GetEnd();
    }

    public interface ISelectable
    {
        public void ClearSelection();
        public void Select(TextPointer start, TextPointer end);
    }
}


================================================
FILE: ColorTextBlock.Avalonia/TextVerticalAlignment.cs
================================================

namespace ColorTextBlock.Avalonia
{
    /// <summary>
    /// The vertical position of text within line
    /// </summary>
    /// <seealso cref="https://github.com/whistyun/Markdown.Avalonia/issues/28"/>
    public enum TextVerticalAlignment
    {
        /// <summary>
        /// Text elements are placed at the top of the line.
        /// </summary>
        Top,
        /// <summary>
        /// Text elements are placed at the middle of the line.
        /// </summary>
        Center,
        /// <summary>
        /// Text elements are placed at the bottom of the line.
        /// </summary>
        Bottom,

        /// <summary>
        /// Text elements are placed at the bottom of the line.
        /// This treats only the height of text element and ignores the padding of element.
        /// Therefore vertical positions of the text will be aligned.
        /// </summary>
        Base,
    }
}


================================================
FILE: LICENSE.txt
================================================
Copyright (c) 2010 Bevan Arps, 2020 Whistyun

Permission is hereby granted, free of charge, to any person obtaining a copy 
of this software and associated documentation files (the "Software"), to deal 
in the Software without restriction, including without limitation the rights 
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 
copies of the Software, and to permit persons to whom the Software is 
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all 
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 
SOFTWARE.


================================================
FILE: Markdown.Avalonia/Markdown.Avalonia.csproj
================================================
<Project Sdk="Microsoft.NET.Sdk">

  <Import Project="..\Markdown.Avalonia.props" />

  <PropertyGroup>
    <TargetFrameworks>$(PackageTargetFrameworks)</TargetFrameworks>
    <Version>$(PackageVersion)</Version>
    <Authors>Bevan Arps(original); whistyun</Authors>
    <PackageId>Markdown.Avalonia</PackageId>
    <AssemblyName>Markdown.Avalonia.Full</AssemblyName>
    <RootNamespace>Markdown.Avalonia.Full</RootNamespace>
    <Company />
    <Description>Markdown Controls for Avalonia</Description>
    <Copyright>Copyright (c) 2010 Bevan Arps, 2020 whistyun</Copyright>
    <PackageProjectUrl>https://github.com/whistyun/Markdown.Avalonia</PackageProjectUrl>
    <LangVersion>9</LangVersion>
    <PackageLicenseExpression>MIT</PackageLicenseExpression>
    <PackageReadmeFile>Markdown.Avalonia.md</PackageReadmeFile>
    <PackageTags>Markdown Avalonia Avaloniaui</PackageTags>
  </PropertyGroup>

  <ItemGroup>
    <None Include="..\pack_readme\Markdown.Avalonia.md" Pack="true" PackagePath="\" />
  </ItemGroup>

  <ItemGroup>
    <ProjectReference Include="..\Markdown.Avalonia.Html\Markdown.Avalonia.Html.csproj" />
    <ProjectReference Include="..\Markdown.Avalonia.Svg\Markdown.Avalonia.Svg.csproj" />
    <ProjectReference Include="..\Markdown.Avalonia.Tight\Markdown.Avalonia.Tight.csproj" />
  </ItemGroup>
  <ItemGroup Condition="'$(EnableAvaloniaEdit)' == 'enabled'">
    <ProjectReference Include="..\Markdown.Avalonia.SyntaxHigh\Markdown.Avalonia.SyntaxHigh.csproj" />    
  </ItemGroup>

</Project>


================================================
FILE: Markdown.Avalonia/MarkdownScrollViewer.cs
================================================
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Markdown.Avalonia.Full
{
    public class MarkdownScrollViewer : global::Markdown.Avalonia.MarkdownScrollViewer
    {

        public MarkdownScrollViewer()
        {
            Plugins = new MdAvPlugins();
        }
    }
}


================================================
FILE: Markdown.Avalonia/MdAvPlugins.cs
================================================
using Markdown.Avalonia.Html;
using Markdown.Avalonia.Plugins;
using Markdown.Avalonia.Svg;
using Markdown.Avalonia.SyntaxHigh;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Markdown.Avalonia.Full
{
    public class MdAvPlugins : global::Markdown.Avalonia.MdAvPlugins
    {
        public MdAvPlugins()
        {
        }

        protected override SetupInfo CreateInfo()
        {
            var setupInf = new SetupInfo();

            var hasSyntaxHigh = false;
            var hasSvgFormat = false;
            var hasHtml = false;

            SyntaxHighlight? syntaxPlugin = null;

            (
                IEnumerable<IMdAvPlugin> orderedPlugin,
                Dictionary<Type, IMdAvPlugin> dic
            ) = ComputeOrderedPlugins();

            foreach (var plugin in orderedPlugin)
            {
                if (plugin is IMdAvPluginRequestAnother another)
                {
                    another.Inject(another.DependsOn.Select(dep => dic[dep]));
                }

                plugin.Setup(setupInf);

                if (plugin is SyntaxHighlight light)
                {
                    hasSyntaxHigh = true;
                    syntaxPlugin = light;
                }
                hasSvgFormat |= plugin is SvgFormat;
                hasHtml |= plugin is HtmlPlugin;
            }

            if (!hasSyntaxHigh)
            {
                syntaxPlugin = new SyntaxHighlight();
                syntaxPlugin.Setup(setupInf);
            }

            if (!hasSvgFormat)
            {
                var svgPlugin = new SvgFormat();
                svgPlugin.Setup(setupInf);
            }

            if (!hasHtml)
            {
                var htmlPlugin = new HtmlPlugin();
                htmlPlugin.Inject(new[] { syntaxPlugin });
                htmlPlugin.Setup(setupInf);
            }

            if (PathResolver is not null)
                setupInf.SetOnce(PathResolver);

            if (ContainerBlockHandler is not null)
                setupInf.SetOnce(ContainerBlockHandler);

            if (HyperlinkCommand is not null)
                setupInf.SetOnce(HyperlinkCommand);

            setupInf.Freeze();

            return setupInf;
        }
    }
}


================================================
FILE: Markdown.Avalonia/Properties/AssemblyInfo.cs
================================================
using Avalonia.Metadata;

[assembly: XmlnsDefinition("https://github.com/whistyun/Markdown.Avalonia", "Markdown.Avalonia.Full")]
[assembly: XmlnsPrefix("https://github.com/whistyun/Markdown.Avalonia", "mdxaml")]


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/ButtonParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Layout;
using ColorTextBlock.Avalonia;
using HtmlAgilityPack;
using System.Collections.Generic;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public class ButtonParser : IInlineTagParser
    {
        public IEnumerable<string> SupportTag => new[] { "button" };

        bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated)
        {
            var rtn = TryReplace(node, manager, out var list);
            generated = list;
            return rtn;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<CInline> generated)
        {
            var doc = new StackPanel() { Orientation = Orientation.Vertical };
            doc.Children.AddRange(manager.ParseChildrenAndGroup(node));

            doc.Loaded += (s, e) =>
            {
                var desiredWidth = doc.DesiredSize.Width;
                var desiredHeight = doc.DesiredSize.Height;


                for (int i = 0; i < 10; ++i)
                {
                    desiredWidth /= 2;
                    var size = new Size(desiredWidth, double.PositiveInfinity);

                    doc.Measure(size);

                    if (desiredHeight != doc.DesiredSize.Height) break;

                    // Give up because it will not be wrapped back.
                    if (i == 9) return;
                }

                var preferedWidth = desiredWidth * 2;

                for (int i = 0; i < 10; ++i)
                {
                    var width = (desiredWidth + preferedWidth) / 2;

                    var size = new Size(width, double.PositiveInfinity);
                    doc.Measure(size);

                    if (desiredHeight == doc.DesiredSize.Height)
                    {
                        preferedWidth = width;
                    }
                    else
                    {
                        desiredWidth = width;
                    }
                }

                doc.Width = preferedWidth;
            };


            var btn = new Button()
            {
                Content = doc,
                IsEnabled = false,
            };

            generated = new[] { new CInlineUIContainer(btn) };
            return true;
        }
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/CodeBlockParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using HtmlAgilityPack;
using Markdown.Avalonia.Html.Core.Utils;
using Markdown.Avalonia.SyntaxHigh;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public class CodeBlockParser : IBlockTagParser
    {
        SyntaxHighlightProvider _provider;

        public CodeBlockParser(SyntaxHighlight syntax)
        {
            _provider = new SyntaxHighlightProvider(syntax.Aliases);
        }


        public IEnumerable<string> SupportTag => new[] { "pre" };

        bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated)
        {
            var rtn = TryReplace(node, manager, out var list);
            generated = list;
            return rtn;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<Control> generated)
        {
            generated = EnumerableExt.Empty<Control>();

            var codeElements = node.ChildNodes.CollectTag("code");
            if (codeElements.Count != 0)
            {
                var rslt = new List<Control>();

                foreach (var codeElement in codeElements)
                {
                    // "language-**", "lang-**", "**" or "sourceCode **"
                    var classVal = codeElement.Attributes["class"]?.Value;

                    var langCode = ParseLangCode(classVal);
                    rslt.Add(DocUtils.CreateCodeBlock(langCode, codeElement.InnerText, manager, _provider));
                }

                generated = rslt;
                return rslt.Count > 0;
            }
            else if (node.ChildNodes.TryCastTextNode(out var textNodes))
            {
                var buff = new StringBuilder();
                foreach (var textNode in textNodes)
                    buff.Append(textNode.InnerText);

                generated = new[] { DocUtils.CreateCodeBlock(null, buff.ToString(), manager, _provider) };
                return true;
            }
            else return false;
        }

        private static string ParseLangCode(string? classVal)
        {
            if (classVal is null) return "";

            // "language-**", "lang-**", "**" or "sourceCode **"
            var indics = Enumerable.Range(0, classVal.Length)
                                   .Reverse()
                                   .Where(i => !Char.IsLetterOrDigit(classVal[i]));

            return classVal.Substring(indics.Any() ? indics.First() + 1 : 0);
        }
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/CommentParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using ColorTextBlock.Avalonia;
using HtmlAgilityPack;
using Markdown.Avalonia.Html.Core.Utils;
using System;
using System.Collections.Generic;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    /// <summary>
    /// remove comment element
    /// </summary>
    public class CommentParsre : IBlockTagParser, IInlineTagParser
    {
        public IEnumerable<string> SupportTag => new[] { HtmlNode.HtmlNodeTypeNameComment };

        bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated)
        {
            generated = EnumerableExt.Empty<StyledElement>();
            return true;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<Control> generated)
        {
            generated = EnumerableExt.Empty<Control>();
            return true;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<CInline> generated)
        {
            generated = EnumerableExt.Empty<CInline>();
            return true;
        }
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/DetailsParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using Avalonia.Input;
using Avalonia.Layout;
using HtmlAgilityPack;
using Markdown.Avalonia.Html.Core.Utils;
using Markdown.Avalonia;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public class DetailsParser : IBlockTagParser
    {
        public IEnumerable<string> SupportTag => new[] { "details" };

        bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated)
        {
            var rtn = TryReplace(node, manager, out var list);
            generated = list;
            return rtn;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<Control> generated)
        {
            var summary = node.ChildNodes.FirstOrDefault(e => e.IsElement("summary"));
            if (summary is null)
            {
                generated = EnumerableExt.Empty<Control>();
                return false;
            }

            var content = node.ChildNodes.Where(e => !ReferenceEquals(e, summary));

            var header = Create(manager.Engine, manager.ParseChildrenAndGroup(summary));

            var expander = new Expander()
            {
                Header = header,
                Content = Create(manager.Engine, manager.Grouping(manager.ParseChildrenJagigng(content))),
            };

            if (node.Attributes["open"] is HtmlAttribute openAttr
                && bool.TryParse(openAttr.Value, out var isOpened))
            {
                expander.IsExpanded = isOpened;
            }

            generated = new[] { expander };
            return true;
        }

        private static StackPanel Create(IMarkdownEngine engine, IEnumerable<Control> blocks)
        {
            var doc = new StackPanel() { Orientation = Orientation.Vertical };
            doc.Children.AddRange(blocks);

            return doc;
        }
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/HorizontalRuleParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using HtmlAgilityPack;
using Markdown.Avalonia.Controls;
using System.Collections.Generic;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public class HorizontalRuleParser : IBlockTagParser
    {
        public IEnumerable<string> SupportTag => new[] { "hr" };

        bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated)
        {
            var rtn = TryReplace(node, manager, out var list);
            generated = list;
            return rtn;
        }

        public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<Control> generated)
        {
            var rule = new Rule(RuleType.Single);
            rule.Classes.Add(Tags.TagRuleSingle.GetClass());

            generated = new[] { rule };
            return true;
        }
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/ITagParser.cs
================================================
using Avalonia;
using Avalonia.Controls;
using ColorTextBlock.Avalonia;
using HtmlAgilityPack;
using System.Collections.Generic;
using System.Linq;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public interface ITagParser
    {
        IEnumerable<string> SupportTag { get; }
        bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<StyledElement> generated);
    }

    public interface IInlineTagParser : ITagParser
    {
        bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<CInline> generated);
    }

    public interface IBlockTagParser : ITagParser
    {
        bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable<Control> generated);
    }

    public interface IHasPriority
    {
        int Priority { get; }
    }

    public static class HasPriority
    {
        public const int DefaultPriority = 10000;

        public static int GetPriority(this ITagParser parser)
            => parser is IHasPriority prop ? prop.Priority : HasPriority.DefaultPriority;
    }
}


================================================
FILE: Markdown.Avalonia.Html/Core/Parsers/ImageParser.cs
================================================
using Avalonia;
using Avalonia.Data;
using Avalonia.Data.Converters;
using Avalonia.Layout;
using ColorTextBlock.Avalonia;
using HtmlAgilityPack;
using Markdown.Avalonia.Html.Core.Utils;
using Markdown.Avalonia.Plugins;
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;

namespace Markdown.Avalonia.Html.Core.Parsers
{
    public class ImagePars
Download .txt
gitextract_t8vp1hh_/

├── .gitattributes
├── .github/
│   └── workflows/
│       └── build.yml
├── .gitignore
├── ColorDocument.Avalonia/
│   ├── ClassNames.cs
│   ├── ColorDocument.Avalonia.csproj
│   ├── DocumentElement.cs
│   ├── DocumentElements/
│   │   ├── BlockquoteElement.cs
│   │   ├── CTextBlockElement.cs
│   │   ├── DocumentRootElement.cs
│   │   ├── HeaderElement.cs
│   │   ├── ListBlockElement.cs
│   │   ├── ListItemElement.cs
│   │   ├── NoteBlockElement.cs
│   │   ├── PlainCodeBlockElement.cs
│   │   ├── TableBlockElement.cs
│   │   ├── TableCellElement.cs
│   │   ├── TextBlockElement.cs
│   │   ├── TextMarkerStyle.cs
│   │   └── UnBlockElement.cs
│   ├── EnumerableExt.cs
│   ├── NumberToOrder.cs
│   ├── RegionUtil.cs
│   ├── SelectionList.cs
│   └── SelectionUtil.cs
├── ColorTextBlock.Avalonia/
│   ├── CBold.cs
│   ├── CCode.cs
│   ├── CHyperlink.cs
│   ├── CImage.cs
│   ├── CInline.cs
│   ├── CInlineUIContainer.cs
│   ├── CItalic.cs
│   ├── CLineBreak.cs
│   ├── CRun.cs
│   ├── CSpan.cs
│   ├── CStrikethrough.cs
│   ├── CTextBlock.cs
│   ├── CTextBlockAutomationPeer.cs
│   ├── CUnderline.cs
│   ├── ColorTextBlock.Avalonia.csproj
│   ├── Fonts/
│   │   └── FontFamilyCollector.cs
│   ├── Geometies/
│   │   ├── CGeometry.cs
│   │   ├── DecoratorGeometry.cs
│   │   ├── DummyGeometryForControl.cs
│   │   ├── ImageGeometry.cs
│   │   ├── LineBreakMarkGeometry.cs
│   │   ├── TextGeometry.cs
│   │   └── TextLineGeometry.cs
│   ├── StringToRunConverter.cs
│   ├── TextPointer.cs
│   └── TextVerticalAlignment.cs
├── LICENSE.txt
├── Markdown.Avalonia/
│   ├── Markdown.Avalonia.csproj
│   ├── MarkdownScrollViewer.cs
│   ├── MdAvPlugins.cs
│   └── Properties/
│       └── AssemblyInfo.cs
├── Markdown.Avalonia.Html/
│   ├── Core/
│   │   ├── Parsers/
│   │   │   ├── ButtonParser.cs
│   │   │   ├── CodeBlockParser.cs
│   │   │   ├── CommentParser.cs
│   │   │   ├── DetailsParser.cs
│   │   │   ├── HorizontalRuleParser.cs
│   │   │   ├── ITagParser.cs
│   │   │   ├── ImageParser.cs
│   │   │   ├── InputParser.cs
│   │   │   ├── OrderListParser.cs
│   │   │   ├── ProgressParser.cs
│   │   │   ├── TagIgnoreParser.cs
│   │   │   ├── TextAreaParser.cs
│   │   │   ├── TextNodeParser.cs
│   │   │   ├── TypicalBlockParser.cs
│   │   │   ├── TypicalBlockParser.tsv
│   │   │   ├── TypicalInlineParser.cs
│   │   │   ├── TypicalInlineParser.tsv
│   │   │   ├── TypicalParseInfo.cs
│   │   │   └── UnorderListParser.cs
│   │   ├── Parsers.MarkdigExtensions/
│   │   │   ├── FigureParser.cs
│   │   │   └── GridTableParser.cs
│   │   ├── ReplaceManager.cs
│   │   ├── Tags.cs
│   │   ├── TextRange.cs
│   │   ├── UnknownTagException.cs
│   │   ├── UnknownTagsOption.cs
│   │   └── Utils/
│   │       ├── DocUtils.cs
│   │       ├── EnumerableExt.cs
│   │       ├── HtmlUtils.cs
│   │       ├── Length.cs
│   │       ├── NodeCollectionExt.cs
│   │       └── StringExt.cs
│   ├── HtmlBlockParser.cs
│   ├── HtmlInlineParser.cs
│   ├── HtmlPlugin.cs
│   ├── Markdown.Avalonia.Html.csproj
│   ├── SimpleHtmlUtils.cs
│   └── Tables/
│       ├── AutoScaleColumnDefinitions.cs
│       ├── Table.cs
│       └── TableCell.cs
├── Markdown.Avalonia.Svg/
│   ├── Markdown.Avalonia.Svg.csproj
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── SvgFormat.cs
│   ├── SvgImageResolver.cs
│   └── VectorImage.cs
├── Markdown.Avalonia.SyntaxHigh/
│   ├── Alias.cs
│   ├── CodeBlockElement.cs
│   ├── CodePad.cs
│   ├── Extensions/
│   │   ├── HSV.cs
│   │   ├── HighlightWrapper.cs
│   │   ├── MixHighlightingBrush.cs
│   │   └── SyntaxHighlightWrapperExtension.cs
│   ├── Markdown.Avalonia.SyntaxHigh.csproj
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── StyleCollections/
│   │   ├── AppendixOfDefaultTheme.axaml
│   │   ├── AppendixOfDefaultTheme.axaml.cs
│   │   ├── AppendixOfFluentAvalonia.axaml
│   │   ├── AppendixOfFluentAvalonia.axaml.cs
│   │   ├── AppendixOfFluentTheme.axaml
│   │   └── AppendixOfFluentTheme.axaml.cs
│   ├── StyleEdit.cs
│   ├── SyntaxHighlightProvider.cs
│   ├── SyntaxHiglight.cs
│   ├── SyntaxOverride.cs
│   └── ThemeDetector.cs
├── Markdown.Avalonia.Tight/
│   ├── CascadeDictionary.cs
│   ├── ChatAISetup.cs
│   ├── ContainerSwitcher.cs
│   ├── Controls/
│   │   ├── AutoScaleColumnDefinitions.cs
│   │   └── Rule.cs
│   ├── CopyMode.cs
│   ├── EmojiTable.cs
│   ├── EmojiTable.txt
│   ├── EngineUpg.cs
│   ├── Extensions/
│   │   ├── AlphaExtension.cs
│   │   ├── ComplementaryExtension.cs
│   │   ├── DivideColorExtension.cs
│   │   └── MultiplyExtension.cs
│   ├── Header.cs
│   ├── HeaderScrolled.cs
│   ├── HeaderScrolledEventArgs.cs
│   ├── IMarkdownEngine.cs
│   ├── IMarkdownEngine2.cs
│   ├── IMarkdownEngineBase.cs
│   ├── Markdown.Avalonia.Tight.csproj
│   ├── Markdown.cs
│   ├── MarkdownScrollViewer.cs
│   ├── MarkdownStyle.cs
│   ├── MdAvPlugins.cs
│   ├── Parsers/
│   │   ├── BlockParser.cs
│   │   ├── BlockParser2.cs
│   │   ├── BlockParserExt.cs
│   │   ├── Builtin/
│   │   │   ├── AbstractHeaderParser.cs
│   │   │   ├── AbstractHorizontalParser.cs
│   │   │   ├── AbstractListParser.cs
│   │   │   ├── AtxHeaderParser.cs
│   │   │   ├── BlockquotesParser.cs
│   │   │   ├── CommonHorizontalParser.cs
│   │   │   ├── CommonListParser.cs
│   │   │   ├── ContainerBlockParser.cs
│   │   │   ├── ExtHorizontalParser.cs
│   │   │   ├── ExtListParser.cs
│   │   │   ├── FencedCodeBlockParser.cs
│   │   │   ├── IndentCodeBlockParser.cs
│   │   │   ├── NoteParser.cs
│   │   │   ├── SetextHeaderParser.cs
│   │   │   └── TableParser.cs
│   │   ├── InlineParser.cs
│   │   └── ParseStatus.cs
│   ├── Plugins/
│   │   ├── BlockOverride2.cs
│   │   ├── IBlockOverrider.cs
│   │   ├── IMdAvPlugin.cs
│   │   ├── IStyleEditor.cs
│   │   └── SetupInfo.cs
│   ├── Properties/
│   │   └── AssemblyInfo.cs
│   ├── StyleCollections/
│   │   ├── INamedStyle.cs
│   │   ├── MarkdownStyleDefaultTheme.axaml
│   │   ├── MarkdownStyleDefaultTheme.axaml.cs
│   │   ├── MarkdownStyleFluentAvalonia.axaml
│   │   ├── MarkdownStyleFluentAvalonia.axaml.cs
│   │   ├── MarkdownStyleFluentTheme.axaml
│   │   ├── MarkdownStyleFluentTheme.axaml.cs
│   │   ├── MarkdownStyleGithubLike.axaml
│   │   ├── MarkdownStyleGithubLike.axaml.cs
│   │   ├── MarkdownStyleStandard.axaml
│   │   └── MarkdownStyleStandard.axaml.cs
│   ├── Tables/
│   │   ├── ITable.cs
│   │   ├── ITableCell.cs
│   │   ├── TextileTable.cs
│   │   └── TextileTableCell.cs
│   ├── TextMarkerStyle.cs
│   └── Utils/
│       ├── DefaultBitmapLoader.cs
│       ├── DefaultHyperlinkCommand.cs
│       ├── DefaultPathResolver.cs
│       ├── Helper.cs
│       ├── IBitmapLoader.cs
│       ├── IContainerBlockHandler.cs
│       ├── IImageResolver.cs
│       ├── IPathResolver.cs
│       ├── InterassemblyUtil.cs
│       ├── TextUtil.cs
│       └── ThemeDetector.cs
├── Markdown.Avalonia.props
├── Markdown.Avalonia.sln
├── Packages.ps1
├── README.md
├── benchmark/
│   └── MdAvBench/
│       ├── Apps/
│       │   ├── App.axaml
│       │   └── App.axaml.cs
│       ├── BenchmarkOfCTextBlock.cs
│       ├── MdAvBench.csproj
│       ├── Program.cs
│       ├── StringLogger.cs
│       └── Xamls/
│           ├── CTextBlockData.axaml
│           ├── CTextBlockData.axaml.cs
│           ├── TextBlockData.axaml
│           └── TextBlockData.axaml.cs
├── demos/
│   ├── Markdown.AvaloniaDemo/
│   │   ├── App.axaml
│   │   ├── App.axaml.cs
│   │   ├── Assets/
│   │   │   ├── AppendingStyles.axaml
│   │   │   ├── Pegasus-Mode.xshd
│   │   │   └── XamlTemplate.txt
│   │   ├── DynamicStyleBehavior.cs
│   │   ├── MainWindow.md
│   │   ├── Markdown.AvaloniaDemo.csproj
│   │   ├── MyConverter.cs
│   │   ├── Program.cs
│   │   ├── ViewLocator.cs
│   │   ├── ViewModels/
│   │   │   ├── MainWindowViewModel.cs
│   │   │   └── ViewModelBase.cs
│   │   ├── Views/
│   │   │   ├── MainWindow.axaml
│   │   │   └── MainWindow.axaml.cs
│   │   └── nuget.config
│   ├── Markdown.AvaloniaFluentAvaloniaDemo/
│   │   ├── App.axaml
│   │   ├── App.axaml.cs
│   │   ├── Assets/
│   │   │   ├── AppendingStyles.axaml
│   │   │   └── XamlTemplate.txt
│   │   ├── Assets2/
│   │   │   └── MainWindow.md
│   │   ├── DynamicStyleBehavior.cs
│   │   ├── MainWindow.md
│   │   ├── Markdown.AvaloniaFluentAvaloniaDemo.csproj
│   │   ├── MyConverter.cs
│   │   ├── Program.cs
│   │   ├── ViewLocator.cs
│   │   ├── ViewModels/
│   │   │   ├── MainWindowViewModel.cs
│   │   │   └── ViewModelBase.cs
│   │   ├── Views/
│   │   │   ├── MainWindow.axaml
│   │   │   └── MainWindow.axaml.cs
│   │   └── nuget.config
│   └── Markdown.AvaloniaFluentDemo/
│       ├── App.axaml
│       ├── App.axaml.cs
│       ├── Assets/
│       │   ├── AppendingStyles.axaml
│       │   └── XamlTemplate.txt
│       ├── Assets2/
│       │   └── MainWindow.md
│       ├── DynamicStyleBehavior.cs
│       ├── MainWindow.md
│       ├── Markdown.AvaloniaFluentDemo.csproj
│       ├── MyConverter.cs
│       ├── Program.cs
│       ├── ViewLocator.cs
│       ├── ViewModels/
│       │   ├── MainWindowViewModel.cs
│       │   └── ViewModelBase.cs
│       ├── Views/
│       │   ├── MainWindow.axaml
│       │   └── MainWindow.axaml.cs
│       └── nuget.config
├── example/
│   ├── CustomStyle/
│   │   ├── CustomStyle/
│   │   │   ├── App.axaml
│   │   │   ├── App.axaml.cs
│   │   │   ├── CustomStyle.csproj
│   │   │   ├── MainWindow.axaml
│   │   │   ├── MainWindow.axaml.cs
│   │   │   ├── Program.cs
│   │   │   ├── SetStyles.axaml
│   │   │   ├── SetStyles.axaml.cs
│   │   │   ├── UseEmbeddedStyle.axaml
│   │   │   ├── UseEmbeddedStyle.axaml.cs
│   │   │   └── nuget.config
│   │   └── CustomStyle.sln
│   └── HowToUse/
│       ├── HowToUse/
│       │   ├── App.axaml
│       │   ├── App.axaml.cs
│       │   ├── HowToUse.csproj
│       │   ├── MainWindow.axaml
│       │   ├── MainWindow.axaml.cs
│       │   ├── Program.cs
│       │   ├── UseBinding.axaml
│       │   ├── UseBinding.axaml.cs
│       │   ├── UseBindingViewModel.cs
│       │   ├── WriteMarkdownInXaml.axaml
│       │   ├── WriteMarkdownInXaml.axaml.cs
│       │   └── nuget.config
│       └── HowToUse.sln
├── key.snk
├── pack_readme/
│   ├── Markdown.Avalonia.Html.md
│   ├── Markdown.Avalonia.Svg.md
│   ├── Markdown.Avalonia.SyntaxHigh.md
│   ├── Markdown.Avalonia.Tight.md
│   └── Markdown.Avalonia.md
├── packs/
│   ├── ColorTextBlock.Avalonia.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.Html.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.Svg.11.0.0-d2.nupkg
│   ├── Markdown.Avalonia.SyntaxHigh.11.0.0-d2.nupkg
│   └── Markdown.Avalonia.Tight.11.0.0-d2.nupkg
└── tests/
    ├── UnitTest.Base/
    │   ├── Apps/
    │   │   ├── App.axaml
    │   │   └── App.axaml.cs
    │   ├── ChangeOutputPathNamer.cs
    │   ├── UnitTest.Base.csproj
    │   ├── UnitTestBase.cs
    │   └── Utils/
    │       ├── BrokenXamlWriter.cs
    │       ├── RunOnUIAttribute.cs
    │       ├── TextUtil.cs
    │       └── Util.cs
    ├── UnitTest.CTxt/
    │   ├── .gitignore
    │   ├── Assets/
    │   │   └── Fonts/
    │   │       └── license.html
    │   ├── Texts/
    │   │   └── MainWindow.md
    │   ├── UnitTest.CTxt.csproj
    │   ├── UnitTestCTxt.cs
    │   ├── Utils/
    │   │   ├── ApprovalImageWriter.cs
    │   │   └── ImageFileApprover.cs
    │   └── Xamls/
    │       ├── Test1.axaml
    │       ├── Test1.axaml.cs
    │       ├── Test2.axaml
    │       ├── Test2.axaml.cs
    │       ├── Test3.axaml
    │       ├── Test3.axaml.cs
    │       ├── Test4.axaml
    │       ├── Test4.axaml.cs
    │       ├── Test5.axaml
    │       ├── Test5.axaml.cs
    │       ├── Test6.axaml
    │       ├── Test6.axaml.cs
    │       ├── Test7.axaml
    │       ├── Test7.axaml.cs
    │       ├── Test99.axaml
    │       └── Test99.axaml.cs
    ├── UnitTest.Md/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTestMd.Transform_givenBlockqoute_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenCodes_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenContainer_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenEmoji.approved.txt
    │   │   ├── UnitTestMd.Transform_givenHorizontalRules_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenImages_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLinksInline_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenLists3_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenMixing2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenMixing_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenTables1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMd.Transform_givenTest1_generatesExpectedResult.approved.txt
    │   │   └── UnitTestMd.Transform_givenTextStyles_generatesExpectedResult.approved.txt
    │   ├── Texts/
    │   │   ├── Blockquite.md
    │   │   ├── Codes.md
    │   │   ├── ContainerBlock.md
    │   │   ├── Emoji.md
    │   │   ├── HorizontalRules.md
    │   │   ├── Images.md
    │   │   ├── Links_inline_style.md
    │   │   ├── Lists1.md
    │   │   ├── Lists2.md
    │   │   ├── Lists3.md
    │   │   ├── Mixing.md
    │   │   ├── Mixing2.md
    │   │   ├── Tables.md
    │   │   ├── Test1.md
    │   │   └── Text_style.md
    │   ├── UnitTest.Md.csproj
    │   └── UnitTestMd.cs
    ├── UnitTest.MdHtml/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTest.Button.approved.txt
    │   │   ├── UnitTest.CodeBlock.approved.txt
    │   │   ├── UnitTest.Details.approved.txt
    │   │   ├── UnitTest.InlineCode.approved.txt
    │   │   ├── UnitTest.Input.approved.txt
    │   │   ├── UnitTest.List.approved.txt
    │   │   ├── UnitTest.Mixing.approved.txt
    │   │   ├── UnitTest.Progres.approved.txt
    │   │   ├── UnitTest.Table.approved.txt
    │   │   ├── UnitTest.TypicalBlock.approved.txt
    │   │   └── UnitTest.TypicalInline.approved.txt
    │   ├── Texts/
    │   │   ├── Button.html
    │   │   ├── CodeBlock.html
    │   │   ├── Details.html
    │   │   ├── InlineCode.html
    │   │   ├── Input.html
    │   │   ├── List.html
    │   │   ├── Mixing.html
    │   │   ├── Progres.html
    │   │   ├── Table.html
    │   │   ├── TypicalBlock.html
    │   │   └── TypicalInline.html
    │   ├── UnitTest.MdHtml.csproj
    │   ├── UnitTest.cs
    │   └── Utils.cs
    ├── UnitTest.MdSyntax/
    │   ├── .gitignore
    │   ├── Out/
    │   │   ├── UnitTestMdSyntax.Transform_givenBlockqoute_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenCodes_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenContainer_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenEmoji.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenHorizontalRules_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenImages_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLinksInline_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenLists3_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenMixing2_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenMixing_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenTables1_generatesExpectedResult.approved.txt
    │   │   ├── UnitTestMdSyntax.Transform_givenTest1_generatesExpectedResult.approved.txt
    │   │   └── UnitTestMdSyntax.Transform_givenTextStyles_generatesExpectedResult.approved.txt
    │   ├── Texts/
    │   │   ├── Blockquite.md
    │   │   ├── Codes.md
    │   │   ├── ContainerBlock.md
    │   │   ├── Emoji.md
    │   │   ├── HorizontalRules.md
    │   │   ├── Images.md
    │   │   ├── Links_inline_style.md
    │   │   ├── Lists1.md
    │   │   ├── Lists2.md
    │   │   ├── Lists3.md
    │   │   ├── Mixing.md
    │   │   ├── Mixing2.md
    │   │   ├── Tables.md
    │   │   ├── Test1.md
    │   │   └── Text_style.md
    │   ├── UnitTest.MdSyntax.csproj
    │   ├── UnitTestConverter.cs
    │   └── UnitTestMdSyntax.cs
    └── UnitTest.props
Download .txt
SYMBOL INDEX (1240 symbols across 234 files)

FILE: ColorDocument.Avalonia/ClassNames.cs
  class ClassNames (line 9) | public static class ClassNames

FILE: ColorDocument.Avalonia/DocumentElement.cs
  class DocumentElement (line 9) | public abstract class DocumentElement
    method GetRect (line 27) | public Rect GetRect(Layoutable anchor) => Control.GetRectInDoc(anchor)...
    method Select (line 28) | public abstract void Select(Point from, Point to);
    method UnSelect (line 29) | public abstract void UnSelect();
    method GetSelectedText (line 31) | public virtual string GetSelectedText()
    method ConstructSelectedText (line 38) | public abstract void ConstructSelectedText(StringBuilder stringBuilder);
  type ISelectionRenderHelper (line 42) | public interface ISelectionRenderHelper
    method Register (line 44) | void Register(Control control);
    method Unregister (line 45) | void Unregister(Control control);

FILE: ColorDocument.Avalonia/DocumentElements/BlockquoteElement.cs
  class BlockquoteElement (line 15) | public class BlockquoteElement : DocumentElement
    method BlockquoteElement (line 24) | public BlockquoteElement(IEnumerable<DocumentElement> child)
    method Create (line 30) | private Border Create()
    method Select (line 45) | public override void Select(Point from, Point to)
    method UnSelect (line 63) | public override void UnSelect()
    method ConstructSelectedText (line 69) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/CTextBlockElement.cs
  class CTextBlockElement (line 11) | public class CTextBlockElement : DocumentElement
    method CTextBlockElement (line 21) | public CTextBlockElement(IEnumerable<CInline> inlines)
    method CTextBlockElement (line 31) | public CTextBlockElement(IEnumerable<CInline> inlines, string appendCl...
    method CTextBlockElement (line 44) | public CTextBlockElement(IEnumerable<CInline> inlines, string appendCl...
    method Select (line 59) | public override void Select(Point from, Point to)
    method UnSelect (line 68) | public override void UnSelect()
    method ConstructSelectedText (line 73) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/DocumentRootElement.cs
  class DocumentRootElement (line 14) | public class DocumentRootElement : DocumentElement
    method DocumentRootElement (line 23) | public DocumentRootElement(IEnumerable<DocumentElement> child)
    method Create (line 29) | private StackPanel Create()
    method Select (line 39) | public override void Select(Point from, Point to)
    method UnSelect (line 57) | public override void UnSelect()
    method ConstructSelectedText (line 63) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/HeaderElement.cs
  class HeaderElement (line 6) | public class HeaderElement : CTextBlockElement
    method HeaderElement (line 10) | public HeaderElement(IEnumerable<CInline> inlines, int level) :

FILE: ColorDocument.Avalonia/DocumentElements/ListBlockElement.cs
  class ListBlockElement (line 12) | public class ListBlockElement : DocumentElement
    method ListBlockElement (line 21) | public ListBlockElement(TextMarkerStyle marker, IEnumerable<ListItemEl...
    method Select (line 27) | public override void Select(Point from, Point to)
    method UnSelect (line 45) | public override void UnSelect()
    method CreateList (line 51) | private Grid CreateList(TextMarkerStyle marker)
    method ConstructSelectedText (line 106) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/ListItemElement.cs
  class ListItemElement (line 10) | public class ListItemElement : DocumentElement
    method ListItemElement (line 21) | public ListItemElement(IEnumerable<DocumentElement> contents)
    method Select (line 35) | public override void Select(Point from, Point to)
    method UnSelect (line 53) | public override void UnSelect()
    method ConstructSelectedText (line 59) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/NoteBlockElement.cs
  class NoteBlockElement (line 11) | public class NoteBlockElement : DocumentElement
    method NoteBlockElement (line 21) | public NoteBlockElement(IEnumerable<CInline> content, TextAlignment? i...
    method Create (line 29) | private Border Create()
    method Select (line 46) | public override void Select(Point from, Point to)
    method UnSelect (line 49) | public override void UnSelect()
    method ConstructSelectedText (line 54) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/PlainCodeBlockElement.cs
  class PlainCodeBlockElement (line 12) | public class PlainCodeBlockElement : DocumentElement
    method PlainCodeBlockElement (line 21) | public PlainCodeBlockElement(string code)
    method Select (line 27) | public override void Select(Point from, Point to)
    method UnSelect (line 31) | public override void UnSelect()
    method CreateBlock (line 35) | public Border CreateBlock()
    method ConstructSelectedText (line 56) | public override void ConstructSelectedText(StringBuilder stringBuilder)

FILE: ColorDocument.Avalonia/DocumentElements/TableBlockElement.cs
  class TableBlockElement (line 10) | public class TableBlockElement : DocumentElement
    method TableBlockElement (line 23) | public TableBlockElement(
    method TableBlockElement (line 35) | public TableBlockElement(
    method Select (line 55) | public override void Select(Point from, Point to)
    method UnSelect (line 73) | public override void UnSelect()
    method CreateTable (line 79) | private Border CreateTable()
    method SetupRow (line 153) | private static List<RowInfo> SetupRow(
    method AdjustRow (line 302) | private static void AdjustRow(Grid grid, List<RowInfo> rowInfs, int ro...
    method CreateRows (line 361) | private void CreateRows(List<RowInf> rowInfs, TableCellElement[][] row...
    method ConstructSelectedText (line 511) | public override void ConstructSelectedText(StringBuilder builder)
    class MdSpan (line 544) | class MdSpan
      method MdSpan (line 549) | public MdSpan(int l, int c)
    class RowInf (line 557) | class RowInf
    class RowInfo (line 564) | class RowInfo
      method RowInfo (line 569) | public RowInfo(string[] classes, int colCount)

FILE: ColorDocument.Avalonia/DocumentElements/TableCellElement.cs
  class TableCellElement (line 12) | public class TableCellElement : DocumentElement
    method TableCellElement (line 29) | public TableCellElement(DocumentElement cell)
    method TableCellElement (line 34) | public TableCellElement(IEnumerable<DocumentElement> cells)
    method Select (line 40) | public override void Select(Point from, Point to)
    method UnSelect (line 58) | public override void UnSelect()
    method CreateCell (line 64) | private Border CreateCell()
    method Setup (line 81) | private Control Setup(Control control)
    method ConstructSelectedText (line 103) | public override void ConstructSelectedText(StringBuilder builder)

FILE: ColorDocument.Avalonia/DocumentElements/TextBlockElement.cs
  class TextBlockElement (line 11) | public class TextBlockElement : DocumentElement
    method TextBlockElement (line 21) | public TextBlockElement(IEnumerable<Inline> inlines)
    method TextBlockElement (line 37) | public TextBlockElement(IEnumerable<Inline> inlines, string appendClass)
    method TextBlockElement (line 53) | public TextBlockElement(IEnumerable<Inline> inlines, string appendClas...
    method Select (line 70) | public override void Select(Point from, Point to) { }
    method UnSelect (line 72) | public override void UnSelect() { }
    method ConstructSelectedText (line 74) | public override void ConstructSelectedText(StringBuilder stringBuilder)

FILE: ColorDocument.Avalonia/DocumentElements/TextMarkerStyle.cs
  type TextMarkerStyle (line 6) | public enum TextMarkerStyle
  class MarkdownStyleExt (line 22) | public static class MarkdownStyleExt
    method CreateMakerText (line 24) | public static string CreateMakerText(this TextMarkerStyle textMarker, ...

FILE: ColorDocument.Avalonia/DocumentElements/UnBlockElement.cs
  class UnBlockElement (line 9) | public class UnBlockElement : DocumentElement
    method UnBlockElement (line 17) | public UnBlockElement(Control control)
    method Select (line 22) | public override void Select(Point from, Point to) { }
    method UnSelect (line 24) | public override void UnSelect() { }
    method ConstructSelectedText (line 26) | public override void ConstructSelectedText(StringBuilder stringBuilder)

FILE: ColorDocument.Avalonia/EnumerableExt.cs
  class EnumerableExt (line 10) | internal static class EnumerableExt
    method ToEnumerable (line 12) | public static EnumerableEx<T> ToEnumerable<T>(this IEnumerable<T> enum...
  class EnumerableEx (line 23) | internal abstract class EnumerableEx<T> : IEnumerable<T>
    method GetEnumerator (line 29) | public abstract IEnumerator<T> GetEnumerator();
    method GetEnumerator (line 31) | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
  class EnumerableExLzy (line 34) | internal class EnumerableExLzy<T> : EnumerableEx<T>
    method EnumerableExLzy (line 38) | public EnumerableExLzy(IEnumerable<T> enm)
    method GetEnumerator (line 47) | public override IEnumerator<T> GetEnumerator() => ((ICollection<T>)_lz...
  class EnumerableExAry (line 50) | internal class EnumerableExAry<T> : EnumerableEx<T>
    method EnumerableExAry (line 54) | public EnumerableExAry(T[] array)
    method GetEnumerator (line 63) | public override IEnumerator<T> GetEnumerator() => ((ICollection<T>)_ar...
  class EnumerableExLst (line 66) | internal class EnumerableExLst<T> : EnumerableEx<T>
    method EnumerableExLst (line 70) | public EnumerableExLst(IList<T> array)
    method GetEnumerator (line 79) | public override IEnumerator<T> GetEnumerator() => _list.GetEnumerator();

FILE: ColorDocument.Avalonia/NumberToOrder.cs
  class NumberToOrder (line 7) | static class NumberToOrder
    method ToRoman (line 9) | public static string ToRoman(int number)
    method ToLatin (line 32) | public static string ToLatin(int number)

FILE: ColorDocument.Avalonia/RegionUtil.cs
  class RegionUtil (line 7) | internal static class RegionUtil
    method GetRectInDoc (line 9) | public static Rect? GetRectInDoc(this Control control, Layoutable anchor)
    method GetRectInDoc (line 37) | public static EnumerableEx<DocumentElementWithBound> GetRectInDoc<T>(t...
  type DocumentElementWithBound (line 56) | internal struct DocumentElementWithBound
    method DocumentElementWithBound (line 61) | public DocumentElementWithBound(DocumentElement c, Rect r)

FILE: ColorDocument.Avalonia/SelectionList.cs
  class SelectionList (line 10) | public class SelectionList : IList<DocumentElement>
    method SelectionList (line 16) | public SelectionList(SelectDirection direction, SelectRange range, ILi...
    method Add (line 35) | public void Add(DocumentElement item) => throw new InvalidOperationExc...
    method Clear (line 37) | public void Clear() => throw new InvalidOperationException();
    method Contains (line 39) | public bool Contains(DocumentElement item) => _elements.Contains(item);
    method CopyTo (line 41) | public void CopyTo(DocumentElement[] array, int arrayIndex) => _elemen...
    method GetEnumerator (line 43) | public IEnumerator<DocumentElement> GetEnumerator() => _elements.GetEn...
    method IndexOf (line 45) | public int IndexOf(DocumentElement item) => _elements.IndexOf(item);
    method Insert (line 47) | public void Insert(int index, DocumentElement item) => throw new Inval...
    method Remove (line 49) | public bool Remove(DocumentElement item) => throw new InvalidOperation...
    method RemoveAt (line 51) | public void RemoveAt(int index) => throw new InvalidOperationException();
    method GetEnumerator (line 53) | IEnumerator IEnumerable.GetEnumerator() => GetEnumerator();
  type SelectDirection (line 56) | public enum SelectDirection
  type SelectRange (line 61) | public enum SelectRange

FILE: ColorDocument.Avalonia/SelectionUtil.cs
  class SelectionUtil (line 9) | internal static class SelectionUtil
    method SelectVertical (line 11) | public static SelectionList SelectVertical<T>(Layoutable anchor, Enume...
    method SelectGrid (line 36) | public static SelectionList SelectGrid<T>(Layoutable anchor, Enumerabl...
    method ComputeIdxVertical (line 61) | static int ComputeIdxVertical(EnumerableEx<DocumentElementWithBound> e...
    method ComputeIdxGrid (line 80) | static int ComputeIdxGrid(EnumerableEx<DocumentElementWithBound> eleme...
    method Select (line 112) | private static List<DocumentElement> Select(EnumerableEx<DocumentEleme...

FILE: ColorTextBlock.Avalonia/CBold.cs
  class CBold (line 9) | public class CBold : CSpan
    method CBold (line 11) | public CBold() { }
    method CBold (line 13) | public CBold(IEnumerable<CInline> inlines) : base(inlines)

FILE: ColorTextBlock.Avalonia/CCode.cs
  class CCode (line 11) | public class CCode : CSpan
    method CCode (line 23) | public CCode() {
    method CCode (line 28) | public CCode(IEnumerable<CInline> inlines) : base(inlines)

FILE: ColorTextBlock.Avalonia/CHyperlink.cs
  class CHyperlink (line 14) | public class CHyperlink : CSpan
    method CHyperlink (line 57) | public CHyperlink() { }
    method CHyperlink (line 59) | public CHyperlink(IEnumerable<CInline> inlines) : base(inlines)
    method MeasureOverride (line 64) | protected override IEnumerable<CGeometry> MeasureOverride(

FILE: ColorTextBlock.Avalonia/CImage.cs
  class CImage (line 17) | public class CImage : CInline
    method CImage (line 75) | public CImage(Task<IImage?> task, IImage whenError)
    method CImage (line 84) | public CImage(IImage image)
    method MeasureOverride (line 90) | protected override IEnumerable<CGeometry> MeasureOverride(
    method AsString (line 177) | public override string AsString() => " $$Image$$ ";

FILE: ColorTextBlock.Avalonia/CInline.cs
  class CInline (line 15) | [TypeConverter(typeof(StringToRunConverter))]
    method OnPropertyChanged (line 194) | protected override void OnPropertyChanged(AvaloniaPropertyChangedEvent...
    method RequestMeasure (line 221) | protected void RequestMeasure()
    method RequestRender (line 237) | protected void RequestRender()
    method Measure (line 256) | internal IEnumerable<CGeometry> Measure(double entireWidth, double rem...
    method MeasureOverride (line 271) | protected abstract IEnumerable<CGeometry> MeasureOverride(
    method AsString (line 281) | public abstract string AsString();

FILE: ColorTextBlock.Avalonia/CInlineUIContainer.cs
  class CInlineUIContainer (line 14) | public class CInlineUIContainer : CInline
    method CInlineUIContainer (line 22) | public CInlineUIContainer(Control content)
    method MeasureOverride (line 27) | protected override IEnumerable<CGeometry> MeasureOverride(double entir...
    method AsString (line 51) | public override string AsString() => String.Empty;

FILE: ColorTextBlock.Avalonia/CItalic.cs
  class CItalic (line 9) | public class CItalic : CSpan
    method CItalic (line 11) | public CItalic() { }
    method CItalic (line 13) | public CItalic(IEnumerable<CInline> inlines) : base(inlines)

FILE: ColorTextBlock.Avalonia/CLineBreak.cs
  class CLineBreak (line 12) | public class CLineBreak : CRun
    method CLineBreak (line 14) | public CLineBreak()
    method MeasureOverride (line 19) | protected override IEnumerable<CGeometry> MeasureOverride(

FILE: ColorTextBlock.Avalonia/CRun.cs
  class CRun (line 15) | public class CRun : CInline
    method MeasureOverride (line 34) | protected override IEnumerable<CGeometry> MeasureOverride(
    method CreateLines (line 91) | private IEnumerable<CGeometry> CreateLines(
    method CreateLines (line 115) | private IEnumerable<CGeometry> CreateLines(
    method CreateTextParagraphProperties (line 147) | internal TextParagraphProperties CreateTextParagraphProperties(TextRun...
    method CreateTextRunProperties (line 157) | internal TextRunProperties CreateTextRunProperties(IBrush? foreground)
    method AsString (line 160) | public override string AsString() => Text;
  type SimpleTextSource (line 164) | readonly struct SimpleTextSource : ITextSource
    method SimpleTextSource (line 171) | public SimpleTextSource(ReadOnlyMemory<char> text, TextRunProperties p...
    method GetTextRun (line 177) | public TextRun? GetTextRun(int textSourceIndex)
    method Subsource (line 182) | public SimpleTextSource Subsource(int start, int length)
    method Substring (line 185) | public string Substring(int start, int length)
    method Substring (line 188) | public string Substring(int start)
    method ChangeForeground (line 191) | public SimpleTextSource ChangeForeground(IBrush? foreground)
    method ToString (line 197) | public override string ToString() => _text.ToString();

FILE: ColorTextBlock.Avalonia/CSpan.cs
  class CSpan (line 17) | public class CSpan : CInline
    method CSpan (line 68) | static CSpan()
    method CSpan (line 152) | public CSpan()
    method CSpan (line 170) | public CSpan(IEnumerable<CInline> inlines)
    method OnPropertyChanged (line 175) | protected override void OnPropertyChanged(AvaloniaPropertyChangedEvent...
    method OnBorderPropertyChanged (line 195) | private void OnBorderPropertyChanged(bool requestMeasure)
    method MeasureOverride (line 230) | protected override IEnumerable<CGeometry> MeasureOverride(
    method PrivateMeasure (line 249) | private IEnumerable<CGeometry> PrivateMeasure(
    method PrivateMeasure (line 278) | private IEnumerable<CGeometry> PrivateMeasure(
    method AsString (line 295) | public override string AsString() => String.Join("", Content.Select(c ...

FILE: ColorTextBlock.Avalonia/CStrikethrough.cs
  class CStrikethrough (line 8) | public class CStrikethrough : CSpan
    method CStrikethrough (line 10) | public CStrikethrough() { }
    method CStrikethrough (line 12) | public CStrikethrough(IEnumerable<CInline> inlines) : base(inlines)

FILE: ColorTextBlock.Avalonia/CTextBlock.cs
  class CTextBlock (line 30) | public class CTextBlock : Control, ITextPointerHandleable
    method CTextBlock (line 137) | static CTextBlock()
    method CTextBlock (line 310) | public CTextBlock()
    method CTextBlock (line 322) | public CTextBlock(string text) : this()
    method CTextBlock (line 327) | public CTextBlock(params CInline[] inlines) : this((IEnumerable<CInlin...
    method CTextBlock (line 331) | public CTextBlock(IEnumerable<CInline> inlines) : this()
    method OnPointerExited (line 338) | protected override void OnPointerExited(PointerEventArgs e)
    method OnPointerMoved (line 349) | protected override void OnPointerMoved(PointerEventArgs e)
    method OnPointerPressed (line 388) | protected override void OnPointerPressed(PointerPressedEventArgs e)
    method OnPointerReleased (line 417) | protected override void OnPointerReleased(PointerReleasedEventArgs e)
    method OnPropertyChanged (line 442) | protected override void OnPropertyChanged(AvaloniaPropertyChangedEvent...
    method ObserveBaseHeightOf (line 471) | public void ObserveBaseHeightOf(CTextBlock target)
    method ContentCollectionChangedd (line 477) | private void ContentCollectionChangedd(object? sender, NotifyCollectio...
    method AttachChildren (line 506) | private void AttachChildren(IEnumerable<CInline> newItems)
    method DetachChildren (line 547) | private void DetachChildren(IEnumerable<CInline> removeItems)
    method OnMeasureSourceChanged (line 570) | internal void OnMeasureSourceChanged()
    method RepaintRequested (line 578) | private void RepaintRequested()
    method ArrangeOverride (line 587) | protected override Size ArrangeOverride(Size finalSize)
    method MeasureOverride (line 611) | protected override Size MeasureOverride(Size availableSize)
    method AreClose (line 625) | private static bool AreClose(double v1, double v2)
    method UpdateGeometry (line 633) | private Size UpdateGeometry()
    method Render (line 765) | public override void Render(DrawingContext context)
    method OnCreateAutomationPeer (line 854) | protected override AutomationPeer OnCreateAutomationPeer()
    method Select (line 859) | public void Select(int begin, int end)
    method Select (line 888) | public void Select(TextPointer begin, TextPointer end)
    method ComplementIntermediate (line 896) | private void ComplementIntermediate()
    method ClearSelection (line 921) | public void ClearSelection()
    method CalcuatePointerFrom (line 929) | public TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 963) | public TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 982) | public TextPointer GetBegin()
    method GetEnd (line 994) | public TextPointer GetEnd()
    method GetSelectedText (line 1009) | public string GetSelectedText()
  class Selection (line 1060) | public class Selection
    method Selection (line 1064) | public Selection(int f, int t)
  class LineInfo (line 1071) | class LineInfo
    method Add (line 1088) | public bool Add(CGeometry metry)
    method OverwriteHeight (line 1125) | public void OverwriteHeight(double height)
    method Max (line 1131) | private static void Max(ref double v1, double v2) => v1 = Math.Max(v1,...
    method Throw (line 1132) | private static void Throw(string msg) => throw new InvalidOperationExc...

FILE: ColorTextBlock.Avalonia/CTextBlockAutomationPeer.cs
  class CTextBlockAutomationPeer (line 8) | public class CTextBlockAutomationPeer : ControlAutomationPeer
    method CTextBlockAutomationPeer (line 10) | public CTextBlockAutomationPeer(CTextBlock owner) : base(owner)
    method GetAutomationControlTypeCore (line 16) | protected override AutomationControlType GetAutomationControlTypeCore()
    method GetNameCore (line 19) | protected override string? GetNameCore()
    method IsControlElementCore (line 22) | protected override bool IsControlElementCore()

FILE: ColorTextBlock.Avalonia/CUnderline.cs
  class CUnderline (line 8) | public class CUnderline : CSpan
    method CUnderline (line 10) | public CUnderline() { }
    method CUnderline (line 12) | public CUnderline(IEnumerable<CInline> inlines) : base(inlines)

FILE: ColorTextBlock.Avalonia/Fonts/FontFamilyCollector.cs
  class FontFamilyCollector (line 9) | internal class FontFamilyCollector
    method TryGetMonospace (line 11) | public static FontFamily? TryGetMonospace()

FILE: ColorTextBlock.Avalonia/Geometies/CGeometry.cs
  class CGeometry (line 8) | public abstract class CGeometry : ITextPointerHandleable
    method CGeometry (line 29) | public CGeometry(
    method Render (line 43) | public abstract void Render(DrawingContext ctx);
    method RequestRepaint (line 45) | internal void RequestRepaint() => RepaintRequested?.Invoke();
    method CalcuatePointerFrom (line 47) | public abstract TextPointer CalcuatePointerFrom(int index);
    method CalcuatePointerFrom (line 48) | public abstract TextPointer CalcuatePointerFrom(double x, double y);
    method GetBegin (line 49) | public abstract TextPointer GetBegin();
    method GetEnd (line 50) | public abstract TextPointer GetEnd();
    method Arranged (line 52) | public virtual void Arranged() { }

FILE: ColorTextBlock.Avalonia/Geometies/DecoratorGeometry.cs
  class DecoratorGeometry (line 13) | public class DecoratorGeometry : CGeometry
    method New (line 75) | internal static DecoratorGeometry New(
    method DecoratorGeometry (line 138) | private DecoratorGeometry(
    method Arranged (line 152) | public override void Arranged()
    method Render (line 185) | public override void Render(DrawingContext ctx)
    method CalcuatePointerFrom (line 199) | public override TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 223) | public override TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 244) | public override TextPointer GetBegin()
    method GetEnd (line 250) | public override TextPointer GetEnd()

FILE: ColorTextBlock.Avalonia/Geometies/DummyGeometryForControl.cs
  class DummyGeometryForControl (line 11) | internal class DummyGeometryForControl : CGeometry
    method DummyGeometryForControl (line 15) | public DummyGeometryForControl(CInlineUIContainer owner, Control contr...
    method Render (line 27) | public override void Render(DrawingContext ctx)
    method CalcuatePointerFrom (line 31) | public override TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 43) | public override TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 53) | public override TextPointer GetBegin()
    method GetEnd (line 58) | public override TextPointer GetEnd()

FILE: ColorTextBlock.Avalonia/Geometies/ImageGeometry.cs
  class ImageGeometry (line 9) | public class ImageGeometry : CGeometry
    method ImageGeometry (line 15) | internal ImageGeometry(
    method Render (line 26) | public override void Render(DrawingContext ctx)
    method CalcuatePointerFrom (line 34) | public override TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 45) | public override TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 54) | public override TextPointer GetBegin()
    method GetEnd (line 59) | public override TextPointer GetEnd()

FILE: ColorTextBlock.Avalonia/Geometies/LineBreakMarkGeometry.cs
  class LineBreakMarkGeometry (line 11) | internal class LineBreakMarkGeometry : TextGeometry
    method LineBreakMarkGeometry (line 15) | internal LineBreakMarkGeometry(
    method LineBreakMarkGeometry (line 23) | internal LineBreakMarkGeometry(CInline owner) :
    method Render (line 29) | public override void Render(DrawingContext ctx) { }
    method CalcuatePointerFrom (line 31) | public override TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 36) | public override TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 46) | public override TextPointer GetBegin()
    method GetEnd (line 51) | public override TextPointer GetEnd()

FILE: ColorTextBlock.Avalonia/Geometies/TextGeometry.cs
  class TextGeometry (line 8) | internal abstract class TextGeometry : CGeometry
    method TextGeometry (line 41) | internal TextGeometry(

FILE: ColorTextBlock.Avalonia/Geometies/TextLineGeometry.cs
  class TextLineGeometry (line 11) | internal class TextLineGeometry : TextGeometry
    method TextLineGeometry (line 17) | internal TextLineGeometry(
    method Render (line 29) | public override void Render(DrawingContext ctx)
    method CalcuatePointerFrom (line 73) | public override TextPointer CalcuatePointerFrom(double x, double y)
    method CalcuatePointerFrom (line 85) | public override TextPointer CalcuatePointerFrom(int index)
    method GetBegin (line 93) | public override TextPointer GetBegin()
    method GetEnd (line 100) | public override TextPointer GetEnd()
    method ToString (line 107) | public override string ToString()

FILE: ColorTextBlock.Avalonia/StringToRunConverter.cs
  class StringToRunConverter (line 8) | public class StringToRunConverter : TypeConverter
    method CanConvertFrom (line 10) | public override bool CanConvertFrom(ITypeDescriptorContext? context, T...
    method ConvertFrom (line 15) | public override object ConvertFrom(ITypeDescriptorContext? context, Cu...

FILE: ColorTextBlock.Avalonia/TextPointer.cs
  class TextPointer (line 9) | public class TextPointer : IEquatable<TextPointer>, IComparable<TextPoin...
    method TextPointer (line 22) | private TextPointer(CInline[] path, CGeometry geometry, int index, int...
    method TextPointer (line 32) | internal TextPointer(CRun inline, TextLineGeometry target, CharacterHi...
    method TextPointer (line 52) | internal TextPointer(CRun inline, TextLineGeometry target, CharacterHi...
    method TextPointer (line 58) | internal TextPointer(CGeometry inline)
    method TextPointer (line 67) | internal TextPointer(CGeometry inline, int idx, double distance)
    method TextPointer (line 77) | internal TextPointer(CTextBlock host, int idx)
    method Wrap (line 85) | internal TextPointer Wrap(CInline owner, int indexAdding)
    method Wrap (line 100) | internal TextPointer Wrap(CTextBlock host, int indexAdding)
    method GetHashCode (line 111) | public override int GetHashCode()
    method Equals (line 119) | public bool Equals(TextPointer? other)
    method CompareTo (line 128) | public int CompareTo(TextPointer? other)
  type ITextPointerHandleable (line 138) | public interface ITextPointerHandleable
    method CalcuatePointerFrom (line 147) | public TextPointer CalcuatePointerFrom(double x, double y);
    method CalcuatePointerFrom (line 149) | public TextPointer CalcuatePointerFrom(int index);
    method GetBegin (line 151) | public TextPointer GetBegin();
    method GetEnd (line 153) | public TextPointer GetEnd();
  type ISelectable (line 156) | public interface ISelectable
    method ClearSelection (line 158) | public void ClearSelection();
    method Select (line 159) | public void Select(TextPointer start, TextPointer end);

FILE: ColorTextBlock.Avalonia/TextVerticalAlignment.cs
  type TextVerticalAlignment (line 8) | public enum TextVerticalAlignment

FILE: Markdown.Avalonia.Html/Core/Parsers.MarkdigExtensions/FigureParser.cs
  class FigureParser (line 12) | public class FigureParser : IBlockTagParser
    method TryReplace (line 16) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 23) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers.MarkdigExtensions/GridTableParser.cs
  class GridTableParser (line 14) | public class GridTableParser : IBlockTagParser, IHasPriority
    method TryReplace (line 20) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 27) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method SetupClass (line 142) | private static void SetupClass(List<List<TableCell>> group, string cls)
    method ParseColumnStyle (line 150) | private static void ParseColumnStyle(HtmlNode tableTag, Table table)
    method CreateRowGroup (line 175) | private static List<List<TableCell>> CreateRowGroup(

FILE: Markdown.Avalonia.Html/Core/Parsers/ButtonParser.cs
  class ButtonParser (line 10) | public class ButtonParser : IInlineTagParser
    method TryReplace (line 14) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 21) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/CodeBlockParser.cs
  class CodeBlockParser (line 13) | public class CodeBlockParser : IBlockTagParser
    method CodeBlockParser (line 17) | public CodeBlockParser(SyntaxHighlight syntax)
    method TryReplace (line 25) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 32) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method ParseLangCode (line 65) | private static string ParseLangCode(string? classVal)

FILE: Markdown.Avalonia.Html/Core/Parsers/CommentParser.cs
  class CommentParsre (line 14) | public class CommentParsre : IBlockTagParser, IInlineTagParser
    method TryReplace (line 18) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 24) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method TryReplace (line 30) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/DetailsParser.cs
  class DetailsParser (line 14) | public class DetailsParser : IBlockTagParser
    method TryReplace (line 18) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 25) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method Create (line 54) | private static StackPanel Create(IMarkdownEngine engine, IEnumerable<C...

FILE: Markdown.Avalonia.Html/Core/Parsers/HorizontalRuleParser.cs
  class HorizontalRuleParser (line 9) | public class HorizontalRuleParser : IBlockTagParser
    method TryReplace (line 13) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 20) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/ITagParser.cs
  type ITagParser (line 10) | public interface ITagParser
    method TryReplace (line 13) | bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable...
  type IInlineTagParser (line 16) | public interface IInlineTagParser : ITagParser
    method TryReplace (line 18) | bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable...
  type IBlockTagParser (line 21) | public interface IBlockTagParser : ITagParser
    method TryReplace (line 23) | bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnumerable...
  type IHasPriority (line 26) | public interface IHasPriority
  class HasPriority (line 31) | public static class HasPriority
    method GetPriority (line 35) | public static int GetPriority(this ITagParser parser)

FILE: Markdown.Avalonia.Html/Core/Parsers/ImageParser.cs
  class ImageParser (line 16) | public class ImageParser : IInlineTagParser
    method ImageParser (line 20) | public ImageParser(SetupInfo info)
    method TryReplace (line 27) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 34) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    class MultiplyConverter (line 106) | class MultiplyConverter : IValueConverter
      method MultiplyConverter (line 110) | public MultiplyConverter(double v)
      method Convert (line 115) | public object? Convert(object? value, Type targetType, object? param...
      method ConvertBack (line 120) | public object? ConvertBack(object? value, Type targetType, object? p...

FILE: Markdown.Avalonia.Html/Core/Parsers/InputParser.cs
  class InputParser (line 10) | public class InputParser : IInlineTagParser
    method TryReplace (line 14) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 21) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/OrderListParser.cs
  class OrderListParser (line 16) | public class OrderListParser : IBlockTagParser
    method TryReplace (line 20) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 27) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method CreateItem (line 71) | private StackPanel CreateItem(IEnumerable<Control> children)

FILE: Markdown.Avalonia.Html/Core/Parsers/ProgressParser.cs
  class ProgressParser (line 9) | public class ProgressParser : IInlineTagParser
    method TryReplace (line 13) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 20) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method TryParse (line 34) | private static int TryParse(string? txt, int def)

FILE: Markdown.Avalonia.Html/Core/Parsers/TagIgnoreParser.cs
  class TagIgnoreParser (line 10) | public class TagIgnoreParser : IBlockTagParser, IInlineTagParser
    method TryReplace (line 14) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 20) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method TryReplace (line 26) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/TextAreaParser.cs
  class TextAreaParser (line 12) | public class TextAreaParser : IInlineTagParser
    method TryReplace (line 16) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 23) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...

FILE: Markdown.Avalonia.Html/Core/Parsers/TextNodeParser.cs
  class TextNodeParser (line 10) | public class TextNodeParser : IInlineTagParser
    method TryReplace (line 14) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 21) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method Replace (line 33) | public IEnumerable<CInline> Replace(string text, ReplaceManager manager)

FILE: Markdown.Avalonia.Html/Core/Parsers/TypicalBlockParser.cs
  class TypicalBlockParser (line 9) | public class TypicalBlockParser : IBlockTagParser
    method TypicalBlockParser (line 16) | public TypicalBlockParser(TypicalParseInfo parser)
    method TryReplace (line 21) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 28) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method Load (line 35) | public static IEnumerable<TypicalBlockParser> Load()

FILE: Markdown.Avalonia.Html/Core/Parsers/TypicalInlineParser.cs
  class TypicalInlineParser (line 9) | public class TypicalInlineParser : IInlineTagParser
    method TypicalInlineParser (line 16) | public TypicalInlineParser(TypicalParseInfo parser)
    method TryReplace (line 21) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 28) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method Load (line 35) | public static IEnumerable<TypicalInlineParser> Load()

FILE: Markdown.Avalonia.Html/Core/Parsers/TypicalParseInfo.cs
  class TypicalParseInfo (line 17) | public class TypicalParseInfo
    method TypicalParseInfo (line 26) | public TypicalParseInfo(string[] line)
    method TryReplace (line 86) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method ExtraModifyHyperlink (line 274) | public void ExtraModifyHyperlink(CHyperlink link, HtmlNode node, Repla...
    method ExtraModifyStrikethrough (line 292) | public void ExtraModifyStrikethrough(CSpan span, HtmlNode node, Replac...
    method ExtraModifySubscript (line 297) | public void ExtraModifySubscript(CSpan span, HtmlNode node, ReplaceMan...
    method ExtraModifySuperscript (line 303) | public void ExtraModifySuperscript(CSpan span, HtmlNode node, ReplaceM...
    method ExtraModifyAcronym (line 309) | public void ExtraModifyAcronym(CSpan span, HtmlNode node, ReplaceManag...
    method ExtraModifyCenter (line 317) | public void ExtraModifyCenter(Border center, HtmlNode node, ReplaceMan...
    method Load (line 330) | internal static IEnumerable<TypicalParseInfo> Load(string resourcePath)

FILE: Markdown.Avalonia.Html/Core/Parsers/UnorderListParser.cs
  class UnorderListParser (line 12) | public class UnorderListParser : IBlockTagParser
    method TryReplace (line 16) | bool ITagParser.TryReplace(HtmlNode node, ReplaceManager manager, out ...
    method TryReplace (line 23) | public bool TryReplace(HtmlNode node, ReplaceManager manager, out IEnu...
    method CreateItem (line 59) | private StackPanel CreateItem(IEnumerable<Control> children)

FILE: Markdown.Avalonia.Html/Core/ReplaceManager.cs
  class ReplaceManager (line 20) | public class ReplaceManager
    method ReplaceManager (line 28) | public ReplaceManager(SyntaxHighlight highlight, SetupInfo info)
    method MaybeSupportBodyTag (line 63) | public bool MaybeSupportBodyTag(string tagName)
    method MaybeSupportInlineTag (line 66) | public bool MaybeSupportInlineTag(string tagName)
    method Register (line 77) | public void Register(ITagParser parser)
    method Parse (line 120) | public IEnumerable<Control> Parse(string htmldoc)
    method Parse (line 131) | public IEnumerable<Control> Parse(HtmlDocument doc)
    method ParseChildrenAndGroup (line 162) | public IEnumerable<Control> ParseChildrenAndGroup(HtmlNode node)
    method ParseChildrenJagging (line 173) | public IEnumerable<StyledElement> ParseChildrenJagging(HtmlNode node)
    method ParseChildrenJagigng (line 178) | public IEnumerable<StyledElement> ParseChildrenJagigng(IEnumerable<Htm...
    method ParseJagging (line 205) | private IEnumerable<StyledElement> ParseJagging(IEnumerable<HtmlNode> ...
    method ParseJaggingAndRunBlockGamut (line 231) | private IEnumerable<StyledElement> ParseJaggingAndRunBlockGamut(IEnume...
    method ParseBlockAndInline (line 272) | public IEnumerable<StyledElement> ParseBlockAndInline(HtmlNode node)
    method ParseBlock (line 302) | public IEnumerable<Control> ParseBlock(string html)
    method ParseInline (line 312) | public IEnumerable<CInline> ParseInline(string html)
    method ParseBlock (line 322) | public IEnumerable<Control> ParseBlock(HtmlNode node)
    method ParseInline (line 354) | public IEnumerable<CInline> ParseInline(HtmlNode node)
    method Grouping (line 388) | public IEnumerable<Control> Grouping(IEnumerable<StyledElement> elements)
    method PickBodyOrHead (line 483) | private static HtmlNode? PickBodyOrHead(HtmlNode documentNode, string ...

FILE: Markdown.Avalonia.Html/Core/Tags.cs
  type Tags (line 8) | public enum Tags
  class TagsExt (line 50) | public static class TagsExt
    method GetClass (line 52) | public static string GetClass(this Tags tag)

FILE: Markdown.Avalonia.Html/Core/TextRange.cs
  type TextRange (line 7) | public struct TextRange
    method TextRange (line 13) | public TextRange(int start, int end)

FILE: Markdown.Avalonia.Html/Core/UnknownTagException.cs
  class UnknownTagException (line 10) | public class UnknownTagException : Exception
    method UnknownTagException (line 22) | public UnknownTagException(HtmlNode node) : base($"unknown tag: {node....

FILE: Markdown.Avalonia.Html/Core/UnknownTagsOption.cs
  type UnknownTagsOption (line 6) | public enum UnknownTagsOption

FILE: Markdown.Avalonia.Html/Core/Utils/DocUtils.cs
  class DocUtils (line 14) | static class DocUtils
    method CreateCodeBlock (line 16) | public static Control CreateCodeBlock(string? lang, string code, Repla...
    method TrimStart (line 37) | public static void TrimStart(CInline? inline)
    method TrimEnd (line 51) | public static void TrimEnd(CInline? inline)

FILE: Markdown.Avalonia.Html/Core/Utils/EnumerableExt.cs
  class EnumerableExt (line 6) | internal static class EnumerableExt
    method TryCast (line 8) | public static bool TryCast<T>(this IEnumerable list, out List<T> casts)
    method Empty (line 21) | public static T[] Empty<T>() => EmptyArray<T>.Value;
  class EmptyArray (line 24) | internal class EmptyArray<T>

FILE: Markdown.Avalonia.Html/Core/Utils/HtmlUtils.cs
  class HtmlUtils (line 9) | class HtmlUtils
    method IsBlockTag (line 80) | public static bool IsBlockTag(string tagName) => s_blockTags.Contains(...

FILE: Markdown.Avalonia.Html/Core/Utils/Length.cs
  class Length (line 9) | internal class Length
    method Length (line 14) | public Length(double value, Unit unit)
    method ToPoint (line 20) | public double ToPoint()
    method TryParse (line 39) | public static bool TryParse(string? text,
  type Unit (line 86) | internal enum Unit

FILE: Markdown.Avalonia.Html/Core/Utils/NodeCollectionExt.cs
  class NodeCollectionExt (line 9) | internal static class NodeCollectionExt
    method SkipComment (line 11) | public static List<HtmlNode> SkipComment(this HtmlNodeCollection list)
    method IsElement (line 28) | public static bool IsElement(this HtmlNode node, string tagName)
    method IsComment (line 33) | public static bool IsComment(this HtmlNode node) => node is HtmlCommen...
    method CollectTag (line 35) | public static List<HtmlNode> CollectTag(this HtmlNodeCollection list)
    method CollectTag (line 52) | public static List<HtmlNode> CollectTag(this HtmlNodeCollection list, ...
    method CollectTag (line 68) | public static List<HtmlNode> CollectTag(this HtmlNodeCollection list, ...
    method HasOneTag (line 86) | public static bool HasOneTag(
    method TryCastTextNode (line 110) | public static bool TryCastTextNode(this HtmlNodeCollection list, out L...
    method Filter (line 137) | public static Tuple<List<HtmlNode>, List<HtmlNode>> Filter(this IEnume...

FILE: Markdown.Avalonia.Html/Core/Utils/StringExt.cs
  class StringExt (line 6) | internal static class StringExt
    method SplitLine (line 8) | public static string[] SplitLine(this string text) => text.Split('\n');
    method TryDecode (line 10) | internal static bool TryDecode(this string text, ref int start, out st...

FILE: Markdown.Avalonia.Html/HtmlBlockParser.cs
  class HtmlBlockParser (line 12) | public class HtmlBlockParser : BlockParser
    method HtmlBlockParser (line 22) | public HtmlBlockParser(SyntaxHighlight highlight, SetupInfo info) : ba...
    method Convert (line 27) | public override IEnumerable<Control> Convert(

FILE: Markdown.Avalonia.Html/HtmlInlineParser.cs
  class HtmlInlineParser (line 12) | public class HtmlInlineParser : InlineParser
    method HtmlInlineParser (line 16) | public HtmlInlineParser(SyntaxHighlight highlight, SetupInfo info) : t...
    method HtmlInlineParser (line 18) | private HtmlInlineParser(ReplaceManager replacer) : base(SimpleHtmlUti...
    method Convert (line 26) | public override IEnumerable<CInline> Convert(

FILE: Markdown.Avalonia.Html/HtmlPlugin.cs
  class HtmlPlugin (line 9) | public class HtmlPlugin : IMdAvPluginRequestAnother
    method Inject (line 15) | public void Inject(IEnumerable<IMdAvPlugin> plugin)
    method Setup (line 20) | public void Setup(SetupInfo info)

FILE: Markdown.Avalonia.Html/SimpleHtmlUtils.cs
  class SimpleHtmlUtils (line 8) | internal static class SimpleHtmlUtils
    method CreateTagstartPattern (line 19) | public static Regex CreateTagstartPattern(IEnumerable<string> tags)
    method SearchTagRange (line 27) | public static int SearchTagRange(string text, Match tagStartPatternMatch)
    method SearchTagRangeContinuous (line 42) | public static int SearchTagRangeContinuous(string text, Match tagStart...
    method SearchTagEnd (line 63) | public static int SearchTagEnd(string text, int start, string startTag...

FILE: Markdown.Avalonia.Html/Tables/AutoScaleColumnDefinitions.cs
  class AutoScaleColumnDefinitions (line 10) | class AutoScaleColumnDefinitions : ColumnDefinitions
    method AutoScaleColumnDefinitions (line 18) | public AutoScaleColumnDefinitions(IEnumerable<LengthInfo> baseLength, ...
    method _grid_LayoutUpdated (line 39) | private void _grid_LayoutUpdated(object? sender, EventArgs e)
    method AdjustColumn (line 71) | private void AdjustColumn()
    method CollectWidthFrom (line 154) | void CollectWidthFrom(int[] indics, double[] widths, LengthUnit[] unit...
    method MeasureColumnWidths (line 183) | private double[] MeasureColumnWidths()
    method ReSetGridChildren (line 224) | private void ReSetGridChildren()
  type LengthInfo (line 232) | readonly struct LengthInfo
    method LengthInfo (line 240) | public LengthInfo(double v, LengthUnit u)
  type LengthUnit (line 247) | enum LengthUnit

FILE: Markdown.Avalonia.Html/Tables/Table.cs
  class Table (line 8) | class Table
    method Table (line 15) | public Table()
    method Structure (line 21) | public void Structure()
    class MdSpan (line 138) | class MdSpan
      method MdSpan (line 143) | public MdSpan(int l, int c)

FILE: Markdown.Avalonia.Html/Tables/TableCell.cs
  class TableCell (line 11) | class TableCell
    method TableCell (line 21) | public TableCell()
    method TableCell (line 30) | public TableCell(IEnumerable<Control> controls) : this()

FILE: Markdown.Avalonia.Svg/SvgFormat.cs
  class SvgFormat (line 5) | public class SvgFormat : IMdAvPlugin
    method Setup (line 7) | public void Setup(SetupInfo info)

FILE: Markdown.Avalonia.Svg/SvgImageResolver.cs
  class SvgImageResolver (line 12) | internal class SvgImageResolver : IImageResolver
    method Load (line 16) | public async Task<IImage?> Load(Stream stream)
    method IsSvgFile (line 34) | private static bool IsSvgFile(Stream fileStream)

FILE: Markdown.Avalonia.Svg/VectorImage.cs
  class VectorImage (line 13) | internal class VectorImage : IImage
    method Draw (line 28) | void IImage.Draw(

FILE: Markdown.Avalonia.SyntaxHigh/Alias.cs
  class Alias (line 5) | public class Alias
    method Validation (line 33) | private void Validation(string name)

FILE: Markdown.Avalonia.SyntaxHigh/CodeBlockElement.cs
  class CodeBlockElement (line 15) | internal class CodeBlockElement : DocumentElement
    method CodeBlockElement (line 25) | public CodeBlockElement(SyntaxHighlightProvider provider, string lang,...
    method ConstructSelectedText (line 32) | public override void ConstructSelectedText(StringBuilder stringBuilder)
    method Select (line 37) | public override void Select(Point from, Point to)
    method UnSelect (line 42) | public override void UnSelect()
    method Create (line 47) | private Border Create(string lang, string code)

FILE: Markdown.Avalonia.SyntaxHigh/CodePad.cs
  class CodePad (line 13) | internal class CodePad : Panel
    method CodePad (line 74) | public CodePad()
    method OnPointerEntered (line 78) | protected override void OnPointerEntered(PointerEventArgs args)
    method OnPointerExited (line 96) | protected override void OnPointerExited(PointerEventArgs e)
    method MeasureOverride (line 110) | protected override Size MeasureOverride(Size availableSize)
    method ArrangeOverride (line 124) | protected override Size ArrangeOverride(Size finalSize)

FILE: Markdown.Avalonia.SyntaxHigh/Extensions/HSV.cs
  type HSV (line 6) | struct HSV
    method HSV (line 12) | public HSV(Color color)
    method ToColor (line 35) | public Color ToColor()

FILE: Markdown.Avalonia.SyntaxHigh/Extensions/HighlightWrapper.cs
  class HighlightWrapper (line 8) | public class HighlightWrapper : IHighlightingDefinition
    method HighlightWrapper (line 16) | public HighlightWrapper(IHighlightingDefinition baseDef, Color foreColor)
    method GetNamedColor (line 43) | public HighlightingColor? GetNamedColor(string name)
    method GetNamedRuleSet (line 48) | public HighlightingRuleSet? GetNamedRuleSet(string name)
    method Wrap (line 53) | private HighlightingRuleSet? Wrap(HighlightingRuleSet ruleSet)
    method Wrap (line 103) | private HighlightingColor? Wrap(HighlightingColor color)

FILE: Markdown.Avalonia.SyntaxHigh/Extensions/MixHighlightingBrush.cs
  class MixHighlightingBrush (line 8) | class MixHighlightingBrush : HighlightingBrush
    method MixHighlightingBrush (line 13) | public MixHighlightingBrush(HighlightingBrush baseBrush, Color fore)
    method GetBrush (line 19) | public override IBrush GetBrush(ITextRunConstructionContext context)
    method GetColor (line 28) | public override Color? GetColor(ITextRunConstructionContext context)
    method WrapColor (line 41) | private Color WrapColor(Color color)

FILE: Markdown.Avalonia.SyntaxHigh/Extensions/SyntaxHighlightWrapperExtension.cs
  class SyntaxHighlightWrapperExtension (line 26) | public class SyntaxHighlightWrapperExtension : MarkupExtension
    method SyntaxHighlightWrapperExtension (line 33) | public SyntaxHighlightWrapperExtension(string colorKey)
    method ProvideValue (line 38) | public override object ProvideValue(IServiceProvider serviceProvider)
    class SyntaxHighlightWrapperConverter (line 60) | class SyntaxHighlightWrapperConverter : IMultiValueConverter
      method Convert (line 62) | public object? Convert(IList<object?> values, Type targetType, objec...
      method ConvertBack (line 91) | public object[] ConvertBack(object value, Type[] targetTypes, object...

FILE: Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfDefaultTheme.axaml.cs
  class AppendixOfDefaultTheme (line 9) | public class AppendixOfDefaultTheme : Styles
    method AppendixOfDefaultTheme (line 11) | public AppendixOfDefaultTheme()

FILE: Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentAvalonia.axaml.cs
  class AppendixOfFluentAvalonia (line 9) | public class AppendixOfFluentAvalonia : Styles
    method AppendixOfFluentAvalonia (line 11) | public AppendixOfFluentAvalonia()

FILE: Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentTheme.axaml.cs
  class AppendixOfFluentTheme (line 9) | public class AppendixOfFluentTheme : Styles
    method AppendixOfFluentTheme (line 11) | public AppendixOfFluentTheme()

FILE: Markdown.Avalonia.SyntaxHigh/StyleEdit.cs
  class StyleEdit (line 7) | internal class StyleEdit : IStyleEdit
    method Edit (line 9) | public void Edit(string styleName, Styles styles)

FILE: Markdown.Avalonia.SyntaxHigh/SyntaxHighlightProvider.cs
  class SyntaxHighlightProvider (line 16) | public class SyntaxHighlightProvider
    method SyntaxHighlightProvider (line 23) | public SyntaxHighlightProvider(ObservableCollection<Alias> aliases)
    method Solve (line 33) | public IHighlightingDefinition Solve(string lang)
    method AliasesCollectionChanged (line 47) | private void AliasesCollectionChanged(NotifyCollectionChangedEventArgs...
    method SetupForBuiltIn (line 87) | private void SetupForBuiltIn()
    method Load (line 101) | private IHighlightingDefinition? Load(Uri source)

FILE: Markdown.Avalonia.SyntaxHigh/SyntaxHiglight.cs
  class SyntaxHighlight (line 22) | public class SyntaxHighlight : IMdAvPlugin
    method Setup (line 27) | public void Setup(SetupInfo info)

FILE: Markdown.Avalonia.SyntaxHigh/SyntaxOverride.cs
  class SyntaxOverride (line 21) | internal class SyntaxOverride : BlockOverride2
    method SyntaxOverride (line 26) | public SyntaxOverride(ObservableCollection<Alias> aliases, SetupInfo i...
    method Convert2 (line 32) | public override IEnumerable<DocumentElement>? Convert2(
    method Convert (line 67) | private IEnumerable<DocumentElement> Convert(string lang, string code)
    method SetupStyle (line 85) | private static void SetupStyle()

FILE: Markdown.Avalonia.SyntaxHigh/ThemeDetector.cs
  class ThemeDetector (line 7) | static class ThemeDetector
    method CheckStyleSourceHost (line 19) | private static bool CheckStyleSourceHost(IStyle style, string hostName)
    method CheckApplicationCurrentStyle (line 34) | private static bool? CheckApplicationCurrentStyle(string themeFQCN, st...
    method Nvl (line 107) | private static bool Nvl(bool? val) => val.HasValue && val.Value;

FILE: Markdown.Avalonia.Tight/CascadeDictionary.cs
  class CascadeDictionary (line 9) | public class CascadeDictionary
    method SetParent (line 15) | public void SetParent(StyledElement element)
    method TryGet (line 21) | public bool TryGet(object key, [MaybeNullWhen(false)] out object? val)
    method TryGet (line 23) | public bool TryGet(object key, out object val)

FILE: Markdown.Avalonia.Tight/ChatAISetup.cs
  class ChatAISetup (line 10) | public class ChatAISetup : IMdAvPlugin
    method Setup (line 12) | public void Setup(SetupInfo info)

FILE: Markdown.Avalonia.Tight/ContainerSwitcher.cs
  class ContainerSwitch (line 12) | public class ContainerSwitch : AvaloniaDictionary<string, IContainerBloc...
    method ProvideControl (line 14) | public Border? ProvideControl(string assetPathRoot, string blockName, ...

FILE: Markdown.Avalonia.Tight/Controls/AutoScaleColumnDefinitions.cs
  class AutoScaleColumnDefinitions (line 11) | public class AutoScaleColumnDefinitions : ColumnDefinitions
    method GetIsEnabled (line 16) | public static bool GetIsEnabled(Control control)
    method SetIsEnabled (line 19) | public static void SetIsEnabled(Control control, bool value)
    method AutoScaleColumnDefinitions (line 27) | public AutoScaleColumnDefinitions(int columnCount, Grid owner)
    method _grid_LayoutUpdated (line 38) | private void _grid_LayoutUpdated(object? sender, EventArgs e)
    method ReSetGridChildren (line 146) | private void ReSetGridChildren()

FILE: Markdown.Avalonia.Tight/Controls/Rule.cs
  class Rule (line 14) | public class Rule : UserControl
    method Rule (line 29) | static Rule()
    method Rule (line 66) | public Rule(RuleType ruleType)
    method MeasureOverride (line 79) | protected override Size MeasureOverride(Size availableSize)
    method Render (line 99) | public override void Render(DrawingContext context)
  type RuleType (line 158) | public enum RuleType

FILE: Markdown.Avalonia.Tight/CopyMode.cs
  type CopyMode (line 9) | public enum CopyMode

FILE: Markdown.Avalonia.Tight/EmojiTable.cs
  class EmojiTable (line 12) | public static class EmojiTable
    method EmojiTable (line 16) | static EmojiTable()
    method LoadTxt (line 27) | private static ConcurrentDictionary<string, string> LoadTxt()
    method TryGet (line 50) | public static bool TryGet(string keyword, [MaybeNullWhen(false)] out s...
    method TryGet (line 52) | public static bool TryGet(string keyword, out string emoji)

FILE: Markdown.Avalonia.Tight/EngineUpg.cs
  class MarkdownEngineExt (line 16) | public static class MarkdownEngineExt
    method Upgrade (line 18) | public static IMarkdownEngine2 Upgrade(this IMarkdownEngine engine)
    class EngineUpg (line 21) | class EngineUpg : IMarkdownEngine2
      method EngineUpg (line 33) | public EngineUpg(IMarkdownEngine engine)
      method Transform (line 38) | public Control Transform(string text)
      method TransformElement (line 41) | public DocumentElement TransformElement(string text)
      method ParseGamutElement (line 44) | public IEnumerable<DocumentElement> ParseGamutElement(string? text, ...
      method ParseGamutInline (line 52) | public IEnumerable<CInline> ParseGamutInline(string? text)

FILE: Markdown.Avalonia.Tight/Extensions/AlphaExtension.cs
  class AlphaExtension (line 18) | public class AlphaExtension : MarkupExtension
    method AlphaExtension (line 23) | public AlphaExtension(string colorKey) : this(colorKey, 1f) { }
    method AlphaExtension (line 25) | public AlphaExtension(string colorKey, float alpha)
    method ProvideValue (line 31) | public override object ProvideValue(IServiceProvider serviceProvider)
    class AlphaConverter (line 44) | class AlphaConverter : IMultiValueConverter
      method AlphaConverter (line 48) | public AlphaConverter(float alpha)
      method Convert (line 53) | public object? Convert(IList<object?> values, Type targetType, objec...

FILE: Markdown.Avalonia.Tight/Extensions/ComplementaryExtension.cs
  class ComplementaryExtension (line 14) | public class ComplementaryExtension : MarkupExtension
    method ComplementaryExtension (line 18) | public ComplementaryExtension(string colorKey)
    method ProvideValue (line 23) | public override object ProvideValue(IServiceProvider serviceProvider)
    class ComplementaryConverter (line 36) | class ComplementaryConverter : IMultiValueConverter
      method ComplementaryConverter (line 38) | public ComplementaryConverter() { }
      method Convert (line 40) | public object? Convert(IList<object?> values, Type targetType, objec...

FILE: Markdown.Avalonia.Tight/Extensions/DivideColorExtension.cs
  class DivideColorExtension (line 17) | public class DivideColorExtension : MarkupExtension
    method DivideColorExtension (line 23) | public DivideColorExtension(string frm, string to, double relate)
    method ProvideValue (line 30) | public override object ProvideValue(IServiceProvider serviceProvider)
  class DivideConverter (line 64) | class DivideConverter : IMultiValueConverter
    method DivideConverter (line 68) | public DivideConverter(double relate)
    method Convert (line 73) | public object? Convert(IList<object?> values, Type targetType, object?...

FILE: Markdown.Avalonia.Tight/Extensions/MultiplyExtension.cs
  class MultiplyExtension (line 18) | public class MultiplyExtension : MarkupExtension
    method MultiplyExtension (line 23) | public MultiplyExtension(string resourceKey) : this(resourceKey, 1) { }
    method MultiplyExtension (line 25) | public MultiplyExtension(string resourceKey, double scale)
    method ProvideValue (line 31) | public override object ProvideValue(IServiceProvider serviceProvider)
    class MultiplyConverter (line 44) | class MultiplyConverter : IMultiValueConverter
      method MultiplyConverter (line 48) | public MultiplyConverter(double scale)
      method Convert (line 53) | public object? Convert(IList<object?> values, Type targetType, objec...

FILE: Markdown.Avalonia.Tight/Header.cs
  class Header (line 5) | public class Header : IEquatable<Header>
    method Header (line 10) | public Header(int lv, string txt)
    method GetHashCode (line 16) | public override int GetHashCode()
    method Equals (line 19) | public override bool Equals(object? obj)
    method Equals (line 22) | public bool Equals(Header? other)

FILE: Markdown.Avalonia.Tight/HeaderScrolledEventArgs.cs
  class HeaderScrolledEventArgs (line 8) | public class HeaderScrolledEventArgs : EventArgs, IEquatable<HeaderScrol...
    method HeaderScrolledEventArgs (line 13) | public HeaderScrolledEventArgs(IList<Header> tree, IList<Header> viewing)
    method GetHashCode (line 19) | public override int GetHashCode()
    method Equals (line 22) | public override bool Equals(object? obj)
    method Equals (line 25) | public bool Equals(HeaderScrolledEventArgs? other)

FILE: Markdown.Avalonia.Tight/IMarkdownEngine.cs
  type IMarkdownEngine (line 14) | public interface IMarkdownEngine : IMarkdownEngineBase
    method Transform (line 31) | Control Transform(string text);
    method RunBlockGamut (line 36) | IEnumerable<Control> RunBlockGamut(string? text, ParseStatus status);
    method RunSpanGamut (line 41) | IEnumerable<CInline> RunSpanGamut(string? text);

FILE: Markdown.Avalonia.Tight/IMarkdownEngine2.cs
  type IMarkdownEngine2 (line 12) | public interface IMarkdownEngine2 : IMarkdownEngineBase
    method Transform (line 26) | Control Transform(string text);
    method TransformElement (line 28) | DocumentElement TransformElement(string text);
    method ParseGamutElement (line 30) | IEnumerable<DocumentElement> ParseGamutElement(string? text, ParseStat...
    method ParseGamutInline (line 32) | IEnumerable<CInline> ParseGamutInline(string? text);

FILE: Markdown.Avalonia.Tight/IMarkdownEngineBase.cs
  type IMarkdownEngineBase (line 9) | public interface IMarkdownEngineBase

FILE: Markdown.Avalonia.Tight/Markdown.cs
  class Markdown (line 28) | public class Markdown : AvaloniaObject, IMarkdownEngine, IMarkdownEngine2
    method Markdown (line 173) | public Markdown()
    method SetupParser (line 194) | private void SetupParser()
    method Transform (line 281) | public Control Transform(string? text)
    method TransformElement (line 286) | public DocumentElement TransformElement(string? text)
    method ParseGamutElement (line 302) | public IEnumerable<DocumentElement> ParseGamutElement(string? text, Pa...
    method ParseGamutInline (line 312) | public IEnumerable<CInline> ParseGamutInline(string? text)
    method RunBlockGamut (line 322) | public IEnumerable<Control> RunBlockGamut(string? text, ParseStatus st...
    method RunSpanGamut (line 337) | public IEnumerable<CInline> RunSpanGamut(string? text)
    method PrivateRunBlockGamut (line 351) | private IEnumerable<DocumentElement> PrivateRunBlockGamut(string text,...
    method PrivateRunSpanGamut (line 442) | private IEnumerable<CInline> PrivateRunSpanGamut(string text)
    method FormParagraphs (line 500) | private IEnumerable<DocumentElement> FormParagraphs(string text, Parse...
    method ImageOrHrefInlineEvaluator (line 569) | private CInline ImageOrHrefInlineEvaluator(Match match)
    method TreatsAsHref (line 582) | private CInline TreatsAsHref(Match match)
    method TreatsAsImage (line 610) | private CInline TreatsAsImage(Match match)
    method LoadImage (line 619) | private CInline LoadImage(string urlTxt, string title)
    method CodeSpanEvaluator (line 702) | private CCode CodeSpanEvaluator(Match match)
    method DoTextDecorations (line 729) | private IEnumerable<CInline> DoTextDecorations(string text, Func<strin...
    method ParseAsUnderline (line 863) | private CUnderline? ParseAsUnderline(string text, ref int start)
    method ParseAsStrikethrough (line 888) | private CStrikethrough? ParseAsStrikethrough(string text, ref int start)
    method ParseAsBoldOrItalic (line 913) | private CInline? ParseAsBoldOrItalic(string text, ref int start)
    method ParseAsColor (line 962) | private CInline? ParseAsColor(string text, ref int start)
    method EscapedIndexOf (line 1037) | private int EscapedIndexOf(string text, int start, char target)
    method CountRepeat (line 1047) | private int CountRepeat(string text, int start, char target)
    method ItalicEvaluator (line 1060) | private CItalic ItalicEvaluator(Match match)
    method BoldEvaluator (line 1067) | private CBold BoldEvaluator(Match match)
    method StrikethroughEvaluator (line 1074) | private CStrikethrough StrikethroughEvaluator(Match match)
    method UnderlineEvaluator (line 1081) | private CUnderline UnderlineEvaluator(Match match)
    method DoText (line 1095) | private IEnumerable<CRun> DoText(string text)
    method GetNestedBracketsPattern (line 1118) | private static string GetNestedBracketsPattern()
    method GetNestedParensPattern (line 1137) | private static string GetNestedParensPattern()
    method RepeatString (line 1155) | private static string RepeatString(string text, int count)
    method Create (line 1168) | private TResult Create<TResult, TContent>(IEnumerable<TContent> content)
  type Candidate (line 1276) | internal struct Candidate<T> : IComparable<Candidate<T>>
    method Candidate (line 1281) | public Candidate(Match result, T parser)
    method CompareTo (line 1287) | public int CompareTo(Candidate<T> other)
  class UnclosableStream (line 1291) | internal class UnclosableStream : Stream
    method UnclosableStream (line 1295) | public UnclosableStream(Stream stream)
    method Flush (line 1311) | public override void Flush() { }
    method Close (line 1312) | public override void Close() { }
    method Read (line 1314) | public override int Read(byte[] buffer, int offset, int count) => _str...
    method Seek (line 1315) | public override long Seek(long offset, SeekOrigin origin) => _stream.S...
    method SetLength (line 1317) | public override void SetLength(long value) => _stream.SetLength(value);
    method Write (line 1319) | public override void Write(byte[] buffer, int offset, int count)

FILE: Markdown.Avalonia.Tight/MarkdownScrollViewer.cs
  class MarkdownScrollViewer (line 28) | public class MarkdownScrollViewer : Control
    method MarkdownScrollViewer (line 97) | public MarkdownScrollViewer()
    method _viewer_PointerPressed (line 162) | private void _viewer_PointerPressed(object? sender, PointerPressedEven...
    method _viewer_PointerMoved (line 178) | private void _viewer_PointerMoved(object? sender, PointerEventArgs e)
    method _viewer_PointerReleased (line 190) | private void _viewer_PointerReleased(object? sender, PointerReleasedEv...
    method OnKeyDown (line 204) | protected override void OnKeyDown(KeyEventArgs e)
    method OnViewportSizeChanged (line 226) | private void OnViewportSizeChanged(object? obj, EventArgs arg)
    method OnScrollChanged (line 232) | private void OnScrollChanged()
    method EditStyle (line 292) | private void EditStyle(IStyle mdstyle)
    method TrySetupSelectionBrush (line 304) | private void TrySetupSelectionBrush(IStyle style)
    method UpdateMarkdown (line 316) | private void UpdateMarkdown()
    class HeaderRect (line 634) | class HeaderRect
      method HeaderRect (line 639) | public HeaderRect(Rect bound, HeaderElement header)
    class Wrapper (line 646) | class Wrapper : Control, ISelectionRenderHelper
      method Wrapper (line 678) | public Wrapper(MarkdownScrollViewer v)
      method Register (line 689) | public void Register(Control control)
      method Unregister (line 711) | public void Unregister(Control control)
      method Clear (line 719) | public void Clear()
      method Restructure (line 725) | public void Restructure()
      method GetRectInDoc (line 741) | public Rect? GetRectInDoc(Control control)

FILE: Markdown.Avalonia.Tight/MarkdownStyle.cs
  class MarkdownStyle (line 16) | public static class MarkdownStyle

FILE: Markdown.Avalonia.Tight/MdAvPlugins.cs
  class MdAvPlugins (line 15) | public class MdAvPlugins
    method MdAvPlugins (line 54) | public MdAvPlugins()
    method CreateInfo (line 60) | protected virtual SetupInfo CreateInfo()
    method ComputeOrderedPlugins (line 101) | protected (IEnumerable<IMdAvPlugin>, Dictionary<Type, IMdAvPlugin>) Co...
    class PluginComparer (line 143) | class PluginComparer : IComparer<IMdAvPlugin>
      method PluginComparer (line 147) | public PluginComparer(Dictionary<Type, IMdAvPlugin> plugins)
      method Compare (line 152) | public int Compare(IMdAvPlugin? x, IMdAvPlugin? y)
      method ComputeRequest (line 176) | private bool ComputeRequest(IMdAvPluginRequestAnother x, IMdAvPlugin...

FILE: Markdown.Avalonia.Tight/Parsers/BlockParser.cs
  class BlockParser (line 11) | public abstract class BlockParser
    method BlockParser (line 17) | public BlockParser(Regex pattern, string name)
    method Convert (line 23) | public abstract IEnumerable<Control>? Convert(
    method New (line 28) | public static BlockParser New(Regex pattern, string name, Func<Match, ...
    method New (line 31) | public static BlockParser New(Regex pattern, string name, Func<Match, ...
    method New (line 34) | public static BlockParser New(Regex pattern, string name, Func<Match, ...
    method New (line 37) | public static BlockParser New(Regex pattern, string name, Func<Match, ...
    method New (line 40) | public static BlockParser New(Regex pattern, string name, ParseWithPos...
    class Wrapper (line 43) | abstract class Wrapper : BlockParser
      method Wrapper (line 45) | public Wrapper(Regex pattern, string name) : base(pattern, name)
      method Convert (line 49) | public override IEnumerable<Control>? Convert(
      method Convert (line 59) | public abstract IEnumerable<Control>? Convert(Match match, ParseStat...
    class Single (line 62) | sealed class Single : Wrapper
      method Single (line 66) | public Single(Regex pattern, string name, Func<Match, Control?> conv...
      method Convert (line 71) | public override IEnumerable<Control>? Convert(Match match, ParseStat...
    class Single2 (line 77) | sealed class Single2 : Wrapper
      method Single2 (line 81) | public Single2(Regex pattern, string name, Func<Match, ParseStatus, ...
      method Convert (line 86) | public override IEnumerable<Control>? Convert(Match match, ParseStat...
    class Multi (line 92) | sealed class Multi : Wrapper
      method Multi (line 96) | public Multi(Regex pattern, string name, Func<Match, IEnumerable<Con...
      method Convert (line 101) | public override IEnumerable<Control>? Convert(Match match, ParseStat...
    class Multi2 (line 105) | sealed class Multi2 : Wrapper
      method Multi2 (line 109) | public Multi2(Regex pattern, string name, Func<Match, ParseStatus, I...
      method Convert (line 114) | public override IEnumerable<Control>? Convert(Match match, ParseStat...
    class ParsePosChange (line 118) | sealed class ParsePosChange : BlockParser
      method ParsePosChange (line 122) | public ParsePosChange(Regex pattern, string name, ParseWithPositionC...
      method Convert (line 127) | public override IEnumerable<Control>? Convert(string text, Match fir...

FILE: Markdown.Avalonia.Tight/Parsers/BlockParser2.cs
  class BlockParser2 (line 9) | public abstract class BlockParser2 : BlockParser
    method BlockParser2 (line 11) | public BlockParser2(Regex pattern, string name) : base(pattern, name)
    method Convert2 (line 15) | public abstract IEnumerable<DocumentElement>? Convert2(string text, Ma...
    method Convert (line 17) | public override IEnumerable<Control>? Convert(string text, Match first...

FILE: Markdown.Avalonia.Tight/Parsers/BlockParserExt.cs
  class BlockParserExt (line 17) | public static class BlockParserExt
    method Upgrade (line 19) | public static BlockParser2 Upgrade(this BlockParser parser)
    class BlockParserUpg (line 24) | class BlockParserUpg : BlockParser2
      method BlockParserUpg (line 28) | public BlockParserUpg(BlockParser parser) : base(parser.Pattern, par...
      method Convert2 (line 33) | public override IEnumerable<DocumentElement>? Convert2(string text, ...
    class MarkdownEngineDng (line 42) | class MarkdownEngineDng : IMarkdownEngine
      method MarkdownEngineDng (line 57) | public MarkdownEngineDng(IMarkdownEngine2 engine2)
      method RunBlockGamut (line 62) | public IEnumerable<Control> RunBlockGamut(string? text, ParseStatus ...
      method RunSpanGamut (line 72) | public IEnumerable<CInline> RunSpanGamut(string? text)
      method Transform (line 82) | public Control Transform(string text)

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/AbstractHeaderParser.cs
  class AbstractHeaderParser (line 9) | internal abstract class AbstractHeaderParser : BlockParser2
    method AbstractHeaderParser (line 11) | protected AbstractHeaderParser(Regex pattern, string name) : base(patt...
    method Create (line 15) | protected IEnumerable<DocumentElement> Create(int level, string header...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/AbstractHorizontalParser.cs
  class AbstractHorizontalParser (line 10) | internal abstract class AbstractHorizontalParser : BlockParser2
    method AbstractHorizontalParser (line 12) | protected AbstractHorizontalParser(Regex pattern) : base(pattern, "Rul...
    method Convert2 (line 16) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...
    method Convert (line 24) | public override IEnumerable<Control>? Convert(string text, Match first...
    method RuleEvaluator (line 32) | private static Rule RuleEvaluator(Match match)

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/AbstractListParser.cs
  class AbstractListParser (line 13) | internal abstract class AbstractListParser : BlockParser2
    method AbstractListParser (line 61) | protected AbstractListParser(Regex pattern) : base(pattern, "ListEvalu...
    method CreateWholeListPattern (line 65) | protected static Regex CreateWholeListPattern(
    method ListEvalutor (line 73) | protected ListBlockElement ListEvalutor(
    method TrimEnd (line 193) | private static void TrimEnd(StringBuilder text)
    method MoveIndent (line 213) | private static bool MoveIndent(string text, int count, ref int caret)
    method MoveLineEnd (line 229) | private static bool MoveLineEnd(string text, ref int caret)
    method GetTextMarkerStyle (line 253) | private static (TextMarkerStyle, string, int) GetTextMarkerStyle(strin...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/AtxHeaderParser.cs
  class AtxHeaderParser (line 7) | internal class AtxHeaderParser : AbstractHeaderParser
    method AtxHeaderParser (line 25) | public AtxHeaderParser() : base(_headerAtx, "AtxHeaderEvaluator")
    method Convert2 (line 29) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/BlockquotesParser.cs
  class BlockquotesParser (line 12) | internal class BlockquotesParser : BlockParser2
    method BlockquotesParser (line 23) | public BlockquotesParser(bool supportTextAlignment) : base(_blockquote...
    method Convert2 (line 28) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/CommonHorizontalParser.cs
  class CommonHorizontalParser (line 10) | internal class CommonHorizontalParser : AbstractHorizontalParser
    method CommonHorizontalParser (line 23) | public CommonHorizontalParser() : base(_horizontalCommonRules)

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/CommonListParser.cs
  class CommonListParser (line 7) | internal class CommonListParser : AbstractListParser
    method CommonListParser (line 13) | public CommonListParser() : base(_commonListNested)
    method Convert2 (line 17) | public override IEnumerable<DocumentElement>? Convert2(

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/ContainerBlockParser.cs
  class ContainerBlockParser (line 9) | internal class ContainerBlockParser : BlockParser2
    method ContainerBlockParser (line 23) | public ContainerBlockParser() : base(_containerBlockFirst, "ContainerB...
    method Convert2 (line 27) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/ExtHorizontalParser.cs
  class ExtHorizontalParser (line 10) | internal class ExtHorizontalParser : AbstractHorizontalParser
    method ExtHorizontalParser (line 32) | public ExtHorizontalParser() : base(_horizontalRules)

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/ExtListParser.cs
  class ExtListParser (line 7) | internal class ExtListParser : AbstractListParser
    method ExtListParser (line 17) | public ExtListParser() : base(_extListNested)
    method Convert2 (line 21) | public override IEnumerable<DocumentElement>? Convert2(

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/FencedCodeBlockParser.cs
  class FencedCodeBlockParser (line 11) | internal class FencedCodeBlockParser : BlockParser2
    method FencedCodeBlockParser (line 22) | public FencedCodeBlockParser(bool enablePreRenderingCodeBlock) : base(...
    method Convert2 (line 27) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...
    method Create (line 56) | public static Border Create(string code)

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/IndentCodeBlockParser.cs
  class IndentCodeBlockParser (line 11) | internal class IndentCodeBlockParser : BlockParser2
    method IndentCodeBlockParser (line 23) | public IndentCodeBlockParser() : base(_indentCodeBlock, "CodeBlocksWit...
    method Convert2 (line 27) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/NoteParser.cs
  class NoteParser (line 13) | internal class NoteParser : BlockParser2
    method NoteParser (line 32) | public NoteParser() : base(_note, "NoteEvaluator")
    method Convert2 (line 36) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/SetextHeaderParser.cs
  class SetextHeaderParser (line 7) | internal class SetextHeaderParser : AbstractHeaderParser
    method SetextHeaderParser (line 28) | public SetextHeaderParser() : base(_headerSetext, "SetextHeaderEvaluat...
    method Convert2 (line 32) | public override IEnumerable<DocumentElement>? Convert2(string text, Ma...

FILE: Markdown.Avalonia.Tight/Parsers/Builtin/TableParser.cs
  class TableParser (line 14) | internal class TableParser : BlockParser2
    method TableParser (line 35) | public TableParser() : base(_table, "TableEvalutor")
    method Convert2 (line 39) | public override IEnumerable<DocumentElement>? Convert2(
    method TableEvalutor (line 51) | private TableBlockElement TableEvalutor(Match match, IMarkdownEngine2 ...
    method CreateRow (line 91) | private TableCellElement[] CreateRow(Dictionary<int, TextAlignment> st...
    method CreateCell (line 113) | private TableCellElement CreateCell(string txt, IMarkdownEngine2 engine)
    method ExtractCoverBar (line 208) | private static string ExtractCoverBar(string txt)
    method ContinueToNum (line 222) | private static string ContinueToNum(string charSource, ref int idx)

FILE: Markdown.Avalonia.Tight/Parsers/InlineParser.cs
  class InlineParser (line 9) | public abstract class InlineParser
    method InlineParser (line 15) | public InlineParser(Regex pattern, string name)
    method Convert (line 21) | public abstract IEnumerable<CInline> Convert(
    method New (line 26) | public static InlineParser New(Regex pattern, string name, Func<Match,...
    method New (line 29) | public static InlineParser New(Regex pattern, string name, Func<Match,...
    class Wrapper (line 32) | abstract class Wrapper : InlineParser
      method Wrapper (line 34) | public Wrapper(Regex pattern, string name) : base(pattern, name)
      method Convert (line 38) | public override IEnumerable<CInline> Convert(
      method Convert (line 48) | public abstract IEnumerable<CInline> Convert(Match match);
    class Single (line 51) | sealed class Single : Wrapper
      method Single (line 55) | public Single(Regex pattern, string name, Func<Match, CInline> conve...
      method Convert (line 60) | public override IEnumerable<CInline> Convert(Match match)
    class Multi (line 66) | sealed class Multi : Wrapper
      method Multi (line 70) | public Multi(Regex pattern, string name, Func<Match, IEnumerable<CIn...
      method Convert (line 75) | public override IEnumerable<CInline> Convert(Match match)

FILE: Markdown.Avalonia.Tight/Parsers/ParseStatus.cs
  type ParseStatus (line 7) | public struct ParseStatus
    method ParseStatus (line 13) | public ParseStatus(bool supportTextAlignment)

FILE: Markdown.Avalonia.Tight/Plugins/BlockOverride2.cs
  class BlockOverride2 (line 10) | public abstract class BlockOverride2 : IBlockOverride
    method BlockOverride2 (line 15) | public BlockOverride2(string parserName)
    method Convert2 (line 20) | public abstract IEnumerable<DocumentElement>? Convert2(string text, Ma...
    method Convert (line 22) | public IEnumerable<Control>? Convert(string text, Match firstMatch, Pa...

FILE: Markdown.Avalonia.Tight/Plugins/IBlockOverrider.cs
  type IBlockOverride (line 12) | public interface IBlockOverride
    method Convert (line 23) | IEnumerable<Control>? Convert(

FILE: Markdown.Avalonia.Tight/Plugins/IMdAvPlugin.cs
  type IMdAvPlugin (line 11) | public interface IMdAvPlugin
    method Setup (line 13) | void Setup(SetupInfo info);
  type IMdAvPluginRequestAnother (line 16) | public interface IMdAvPluginRequestAnother : IMdAvPlugin
    method Inject (line 20) | void Inject(IEnumerable<IMdAvPlugin> plugin);

FILE: Markdown.Avalonia.Tight/Plugins/IStyleEditor.cs
  type IStyleEdit (line 8) | public interface IStyleEdit
    method Edit (line 10) | void Edit(string styleName, Styles style);

FILE: Markdown.Avalonia.Tight/Plugins/SetupInfo.cs
  class SetupInfo (line 24) | public class SetupInfo
    method SetupInfo (line 65) | public SetupInfo()
    method Register (line 169) | public void Register(IBlockOverride overrider)
    method RegisterTop (line 175) | public void RegisterTop(BlockParser parser)
    method RegisterSecond (line 181) | public void RegisterSecond(BlockParser parser)
    method Register (line 187) | public void Register(InlineParser parser)
    method Register (line 193) | public void Register(IStyleEdit editor)
    method SetOnce (line 199) | public void SetOnce(ICommand command)
    method SetOnce (line 211) | public void SetOnce(IContainerBlockHandler handler)
    method SetOnce (line 223) | public void SetOnce(IPathResolver resolver)
    method Register (line 235) | public void Register(IImageResolver resolver)
    method Builtin (line 242) | internal SetupInfo Builtin()
    method Override (line 269) | internal BlockParser Override(BlockParser parser)
    method Overwrite (line 283) | internal void Overwrite(ICommand? hyperlink)
    method Overwrite (line 288) | internal void Overwrite(IContainerBlockHandler? handler)
    method Overwrite (line 294) | internal void Overwrite(IBitmapLoader? loader)
    method Freeze (line 300) | public void Freeze()
    method LoadImage (line 306) | public CImage LoadImage(string urlTxt) => _imageLoader.Load(urlTxt);
    method CheckChangeable (line 309) | internal void CheckChangeable()
    class BlockParserOverride (line 316) | class BlockParserOverride : BlockParser
      method BlockParserOverride (line 319) | public BlockParserOverride(Regex pattern, string name, IBlockOverrid...
      method Convert (line 324) | public override IEnumerable<Control>? Convert(
    class BlockParserOverride2 (line 333) | class BlockParserOverride2 : BlockParser2
      method BlockParserOverride2 (line 336) | public BlockParserOverride2(Regex pattern, string name, BlockOverrid...
      method Convert2 (line 341) | public override IEnumerable<DocumentElement>? Convert2(string text, ...
    class ImageLoader (line 345) | class ImageLoader
      method ImageLoader (line 356) | public ImageLoader(SetupInfo info)
      method Load (line 369) | public CImage Load(string urlTxt)
      method LoadImageByPlugin (line 387) | private async Task<IImage?> LoadImageByPlugin(string urlTxt)

FILE: Markdown.Avalonia.Tight/StyleCollections/INamedStyle.cs
  type INamedStyle (line 3) | internal interface INamedStyle

FILE: Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleDefaultTheme.axaml.cs
  class MarkdownStyleDefaultTheme (line 9) | public class MarkdownStyleDefaultTheme : Styles, INamedStyle
    method MarkdownStyleDefaultTheme (line 14) | public MarkdownStyleDefaultTheme()

FILE: Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentAvalonia.axaml.cs
  class MarkdownStyleFluentAvalonia (line 9) | public class MarkdownStyleFluentAvalonia : Styles, INamedStyle
    method MarkdownStyleFluentAvalonia (line 14) | public MarkdownStyleFluentAvalonia()

FILE: Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentTheme.axaml.cs
  class MarkdownStyleFluentTheme (line 9) | public class MarkdownStyleFluentTheme : Styles, INamedStyle
    method MarkdownStyleFluentTheme (line 14) | public MarkdownStyleFluentTheme()

FILE: Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleGithubLike.axaml.cs
  class MarkdownStyleGithubLike (line 9) | public class MarkdownStyleGithubLike : Styles, INamedStyle
    method MarkdownStyleGithubLike (line 14) | public MarkdownStyleGithubLike()

FILE: Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleStandard.axaml.cs
  class MarkdownStyleStandard (line 9) | public class MarkdownStyleStandard : Styles, INamedStyle
    method MarkdownStyleStandard (line 14) | public MarkdownStyleStandard()

FILE: Markdown.Avalonia.Tight/Tables/ITable.cs
  type ITable (line 5) | interface ITable

FILE: Markdown.Avalonia.Tight/Tables/ITableCell.cs
  type ITableCell (line 6) | interface ITableCell

FILE: Markdown.Avalonia.Tight/Tables/TextileTable.cs
  class TextileTable (line 10) | class TextileTable : ITable
    method TextileTable (line 17) | public TextileTable(
    class MdSpan (line 237) | class MdSpan
      method MdSpan (line 242) | public MdSpan(int l, int c)

FILE: Markdown.Avalonia.Tight/Tables/TextileTableCell.cs
  class TextileTableCell (line 8) | class TextileTableCell : ITableCell
    method TextileTableCell (line 19) | public TextileTableCell(string? txt)
    method ParseFormatFrom (line 54) | private string ParseFormatFrom(string txt)
    method ContinueToNum (line 120) | private static string ContinueToNum(string charSource, ref int idx)

FILE: Markdown.Avalonia.Tight/TextMarkerStyle.cs
  type TextMarkerStyle (line 8) | public enum TextMarkerStyle
  class MarkdownStyleExt (line 24) | public static class MarkdownStyleExt
    method Change (line 26) | public static ColorDocument.Avalonia.DocumentElements.TextMarkerStyle ...
    method CreateMakerText (line 42) | public static string CreateMakerText(this TextMarkerStyle textMarker, ...

FILE: Markdown.Avalonia.Tight/Utils/DefaultBitmapLoader.cs
  class DefaultBitmapLoader (line 17) | [Obsolete("see https://github.com/whistyun/Markdown.Avalonia/wiki/How-to...
    method DefaultBitmapLoader (line 27) | public DefaultBitmapLoader()
    method Compact (line 43) | private void Compact()
    method GetAsync (line 54) | public Task<Bitmap?> GetAsync(string urlTxt)
    method Get (line 59) | public Bitmap? Get(string urlTxt)
    method Get (line 102) | public Bitmap? Get(Uri url)

FILE: Markdown.Avalonia.Tight/Utils/DefaultHyperlinkCommand.cs
  class DefaultHyperlinkCommand (line 10) | public class DefaultHyperlinkCommand : ICommand
    method CanExecute (line 28) | public bool CanExecute(object? parameter)
    method Execute (line 33) | public void Execute(object? parameter)
    method GoTo (line 39) | public static void GoTo(string url)

FILE: Markdown.Avalonia.Tight/Utils/DefaultPathResolver.cs
  class DefaultPathResolver (line 15) | public class DefaultPathResolver : IPathResolver
    method ResolveImageResource (line 22) | public async Task<Stream?>? ResolveImageResource(string relativeOrAbso...
    method OpenStream (line 65) | private async Task<Stream?> OpenStream(Uri url)

FILE: Markdown.Avalonia.Tight/Utils/Helper.cs
  class Helper (line 9) | static class Helper
    method ThrowInvalidOperation (line 11) | public static void ThrowInvalidOperation(string msg)

FILE: Markdown.Avalonia.Tight/Utils/IBitmapLoader.cs
  type IBitmapLoader (line 9) | [Obsolete("see https://github.com/whistyun/Markdown.Avalonia/wiki/How-to...
    method Get (line 17) | Bitmap? Get(string urlTxt);

FILE: Markdown.Avalonia.Tight/Utils/IContainerBlockHandler.cs
  type IContainerBlockHandler (line 9) | public interface IContainerBlockHandler
    method ProvideControl (line 19) | Border? ProvideControl( string assetPathRoot,

FILE: Markdown.Avalonia.Tight/Utils/IImageResolver.cs
  type IImageResolver (line 20) | public interface IImageResolver
    method Load (line 30) | Task<IImage?> Load(Stream stream);

FILE: Markdown.Avalonia.Tight/Utils/IPathResolver.cs
  type IPathResolver (line 22) | public interface IPathResolver
    method ResolveImageResource (line 36) | Task<Stream?>? ResolveImageResource(string relativeOrAbsolutePath);

FILE: Markdown.Avalonia.Tight/Utils/InterassemblyUtil.cs
  class InterassemblyUtil (line 8) | static class InterassemblyUtil
    method InvokeInstanceMethodToGetProperty (line 10) | public static T? InvokeInstanceMethodToGetProperty<T>(string asmNm, st...

FILE: Markdown.Avalonia.Tight/Utils/TextUtil.cs
  class TextUtil (line 9) | static class TextUtil
    method CountIndent (line 15) | public static int CountIndent(string line)
    method DetentLineBestEffort (line 37) | public static string DetentLineBestEffort(string line, int indentCount)
    method TryDetendLine (line 73) | public static bool TryDetendLine(string line, int indentCount, out str...
    method Normalize (line 113) | public static string Normalize(string text, int tabWidth = 4)

FILE: Markdown.Avalonia.Tight/Utils/ThemeDetector.cs
  class ThemeDetector (line 8) | static class ThemeDetector
    method CheckApplicationCurrentStyle (line 22) | private static bool? CheckApplicationCurrentStyle(string themeFQCN, st...

FILE: Markdown.Avalonia/MarkdownScrollViewer.cs
  class MarkdownScrollViewer (line 9) | public class MarkdownScrollViewer : global::Markdown.Avalonia.MarkdownSc...
    method MarkdownScrollViewer (line 12) | public MarkdownScrollViewer()

FILE: Markdown.Avalonia/MdAvPlugins.cs
  class MdAvPlugins (line 14) | public class MdAvPlugins : global::Markdown.Avalonia.MdAvPlugins
    method MdAvPlugins (line 16) | public MdAvPlugins()
    method CreateInfo (line 20) | protected override SetupInfo CreateInfo()

FILE: benchmark/MdAvBench/Apps/App.axaml.cs
  class App (line 19) | public class App : Application
    method Initialize (line 24) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 29) | public override void OnFrameworkInitializationCompleted()
    method Loaded (line 47) | private void Loaded()
    method Start (line 53) | public static IDisposable Start()
    method StartOnThread (line 63) | public static void StartOnThread()
  class AppStarter (line 70) | class AppStarter : IDisposable
    method Start (line 74) | public void Start()
    method Dispose (line 91) | public void Dispose()

FILE: benchmark/MdAvBench/BenchmarkOfCTextBlock.cs
  class BenchmarkOfCTextBlock (line 15) | [SimpleJob]
    method BenchmarkOfCTextBlock (line 21) | public BenchmarkOfCTextBlock()
    method DispatcherDelay (line 42) | [Benchmark]
    method RenderByCTextBlock (line 48) | [Benchmark]
    method RenderByTextBlock (line 67) | [Benchmark]
    method Cleanup (line 86) | [GlobalCleanup]

FILE: benchmark/MdAvBench/Program.cs
  class Program (line 19) | class Program
    method Main (line 21) | public static void Main(string[] args)

FILE: benchmark/MdAvBench/StringLogger.cs
  class StringLogger (line 6) | internal class StringLogger : ILogger
    method StringLogger (line 13) | public StringLogger() { }
    method Flush (line 15) | public void Flush()
    method Write (line 19) | public void Write(LogKind logKind, string text)
    method WriteLine (line 24) | public void WriteLine()
    method WriteLine (line 29) | public void WriteLine(LogKind logKind, string text)
    method ToString (line 34) | public override string ToString() => _builder.ToString();

FILE: benchmark/MdAvBench/Xamls/CTextBlockData.axaml.cs
  class CTextBlockData (line 8) | public partial class CTextBlockData : UserControl
    method CTextBlockData (line 10) | public CTextBlockData()
    method InitializeComponent (line 15) | private void InitializeComponent()

FILE: benchmark/MdAvBench/Xamls/TextBlockData.axaml.cs
  class TextBlockData (line 5) | public partial class TextBlockData : UserControl
    method TextBlockData (line 7) | public TextBlockData()

FILE: demos/Markdown.AvaloniaDemo/App.axaml.cs
  class App (line 9) | public class App : Application
    method Initialize (line 11) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 16) | public override void OnFrameworkInitializationCompleted()

FILE: demos/Markdown.AvaloniaDemo/DynamicStyleBehavior.cs
  class DynamicStyleBehavior (line 16) | public class DynamicStyleBehavior
    method Validate (line 32) | public static string Validate(AvaloniaObject obj, string xamlTxt)
    method SetXamlText (line 68) | public static void SetXamlText(MarkdownScrollViewer ctrl, string xamlTxt)
    method GetXamlText (line 71) | public static string GetXamlText(MarkdownScrollViewer ctrl)
    method SetValidationResult (line 74) | public static void SetValidationResult(MarkdownScrollViewer ctrl, ICom...
    method GetValidationResult (line 77) | public static ICommand GetValidationResult(MarkdownScrollViewer ctrl)

FILE: demos/Markdown.AvaloniaDemo/MyConverter.cs
  class MyConverter (line 10) | public class MyConverter : IValueConverter
    method Convert (line 12) | public object Convert(object value, Type targetType, object parameter,...
    method ConvertBack (line 22) | public object ConvertBack(object value, Type targetType, object parame...

FILE: demos/Markdown.AvaloniaDemo/Program.cs
  class Program (line 9) | class Program
    method Main (line 14) | public static void Main(string[] args)
    method BuildAvaloniaApp (line 31) | public static AppBuilder BuildAvaloniaApp()

FILE: demos/Markdown.AvaloniaDemo/ViewLocator.cs
  class ViewLocator (line 8) | public class ViewLocator : IDataTemplate
    method Build (line 12) | public Control Build(object data)
    method Match (line 27) | public bool Match(object data)

FILE: demos/Markdown.AvaloniaDemo/ViewModels/MainWindowViewModel.cs
  class MainWindowViewModel (line 16) | public class MainWindowViewModel : ViewModelBase
    method XamlParseResult (line 55) | public void XamlParseResult(string result) => ErrorInfo = result;
    method TryParse (line 57) | public void TryParse() => AppendStyleXamlText = EdittingStyleXamlText;
    method MainWindowViewModel (line 59) | public MainWindowViewModel()
  class StyleViewModel (line 88) | public class StyleViewModel

FILE: demos/Markdown.AvaloniaDemo/ViewModels/ViewModelBase.cs
  class ViewModelBase (line 8) | public class ViewModelBase : ReactiveObject

FILE: demos/Markdown.AvaloniaDemo/Views/MainWindow.axaml.cs
  class MainWindow (line 9) | public partial class MainWindow : Window
    method MainWindow (line 13) | public MainWindow()
    method InitializeComponent (line 20) | private void InitializeComponent()
    method HeaderScrolled (line 25) | private void HeaderScrolled(object sender, HeaderScrolledEventArgs args)

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/App.axaml.cs
  class App (line 9) | public class App : Application
    method Initialize (line 11) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 16) | public override void OnFrameworkInitializationCompleted()

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/DynamicStyleBehavior.cs
  class DynamicStyleBehavior (line 16) | public class DynamicStyleBehavior
    method Validate (line 32) | public static string Validate(AvaloniaObject obj, string xamlTxt)
    method SetXamlText (line 67) | public static void SetXamlText(MarkdownScrollViewer ctrl, string xamlTxt)
    method GetXamlText (line 70) | public static string GetXamlText(MarkdownScrollViewer ctrl)
    method SetValidationResult (line 73) | public static void SetValidationResult(MarkdownScrollViewer ctrl, ICom...
    method GetValidationResult (line 76) | public static ICommand GetValidationResult(MarkdownScrollViewer ctrl)

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/MyConverter.cs
  class MyConverter (line 10) | public class MyConverter : IValueConverter
    method Convert (line 12) | public object Convert(object value, Type targetType, object parameter,...
    method ConvertBack (line 22) | public object ConvertBack(object value, Type targetType, object parame...

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/Program.cs
  class Program (line 6) | class Program
    method Main (line 11) | public static void Main(string[] args) => BuildAvaloniaApp()
    method BuildAvaloniaApp (line 15) | public static AppBuilder BuildAvaloniaApp()

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/ViewLocator.cs
  class ViewLocator (line 8) | public class ViewLocator : IDataTemplate
    method Build (line 12) | public Control Build(object data)
    method Match (line 27) | public bool Match(object data)

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/ViewModels/MainWindowViewModel.cs
  class MainWindowViewModel (line 14) | public class MainWindowViewModel : ViewModelBase
    method XamlParseResult (line 80) | public void XamlParseResult(string result) => ErrorInfo = result;
    method TryParse (line 82) | public void TryParse() => AppendStyleXamlText = EdittingStyleXamlText;
    method MainWindowViewModel (line 84) | public MainWindowViewModel()
    method ApplyAssetPathRoot (line 99) | public void ApplyAssetPathRoot()
    method ApplySource (line 102) | public void ApplySource()

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/ViewModels/ViewModelBase.cs
  class ViewModelBase (line 8) | public class ViewModelBase : ReactiveObject

FILE: demos/Markdown.AvaloniaFluentAvaloniaDemo/Views/MainWindow.axaml.cs
  class MainWindow (line 9) | public partial class MainWindow : Window
    method MainWindow (line 11) | public MainWindow()
    method InitializeComponent (line 17) | private void InitializeComponent()
    method SetupComponent (line 23) | private void SetupComponent()

FILE: demos/Markdown.AvaloniaFluentDemo/App.axaml.cs
  class App (line 9) | public class App : Application
    method Initialize (line 11) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 16) | public override void OnFrameworkInitializationCompleted()

FILE: demos/Markdown.AvaloniaFluentDemo/DynamicStyleBehavior.cs
  class DynamicStyleBehavior (line 16) | public class DynamicStyleBehavior
    method Validate (line 32) | public static string Validate(AvaloniaObject obj, string xamlTxt)
    method SetXamlText (line 67) | public static void SetXamlText(MarkdownScrollViewer ctrl, string xamlTxt)
    method GetXamlText (line 70) | public static string GetXamlText(MarkdownScrollViewer ctrl)
    method SetValidationResult (line 73) | public static void SetValidationResult(MarkdownScrollViewer ctrl, ICom...
    method GetValidationResult (line 76) | public static ICommand GetValidationResult(MarkdownScrollViewer ctrl)

FILE: demos/Markdown.AvaloniaFluentDemo/MyConverter.cs
  class MyConverter (line 10) | public class MyConverter : IValueConverter
    method Convert (line 12) | public object Convert(object value, Type targetType, object parameter,...
    method ConvertBack (line 22) | public object ConvertBack(object value, Type targetType, object parame...

FILE: demos/Markdown.AvaloniaFluentDemo/Program.cs
  class Program (line 6) | class Program
    method Main (line 11) | public static void Main(string[] args) => BuildAvaloniaApp()
    method BuildAvaloniaApp (line 15) | public static AppBuilder BuildAvaloniaApp()

FILE: demos/Markdown.AvaloniaFluentDemo/ViewLocator.cs
  class ViewLocator (line 8) | public class ViewLocator : IDataTemplate
    method Build (line 12) | public Control Build(object data)
    method Match (line 27) | public bool Match(object data)

FILE: demos/Markdown.AvaloniaFluentDemo/ViewModels/MainWindowViewModel.cs
  class MainWindowViewModel (line 14) | public class MainWindowViewModel : ViewModelBase
    method XamlParseResult (line 80) | public void XamlParseResult(string result) => ErrorInfo = result;
    method TryParse (line 82) | public void TryParse() => AppendStyleXamlText = EdittingStyleXamlText;
    method MainWindowViewModel (line 84) | public MainWindowViewModel()
    method ApplyAssetPathRoot (line 99) | public void ApplyAssetPathRoot()
    method ApplySource (line 102) | public void ApplySource()

FILE: demos/Markdown.AvaloniaFluentDemo/ViewModels/ViewModelBase.cs
  class ViewModelBase (line 8) | public class ViewModelBase : ReactiveObject

FILE: demos/Markdown.AvaloniaFluentDemo/Views/MainWindow.axaml.cs
  class MainWindow (line 9) | public partial class MainWindow : Window
    method MainWindow (line 11) | public MainWindow()
    method InitializeComponent (line 17) | private void InitializeComponent()
    method SetupComponent (line 23) | private void SetupComponent()

FILE: example/CustomStyle/CustomStyle/App.axaml.cs
  class App (line 7) | public class App : Application
    method Initialize (line 9) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 14) | public override void OnFrameworkInitializationCompleted()

FILE: example/CustomStyle/CustomStyle/MainWindow.axaml.cs
  class MainWindow (line 7) | public class MainWindow : Window
    method MainWindow (line 9) | public MainWindow()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: example/CustomStyle/CustomStyle/Program.cs
  class Program (line 5) | class Program
    method Main (line 10) | public static void Main(string[] args) => BuildAvaloniaApp()
    method BuildAvaloniaApp (line 14) | public static AppBuilder BuildAvaloniaApp()

FILE: example/CustomStyle/CustomStyle/SetStyles.axaml.cs
  class SetStyles (line 7) | public class SetStyles : UserControl
    method SetStyles (line 9) | public SetStyles()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: example/CustomStyle/CustomStyle/UseEmbeddedStyle.axaml.cs
  class UseEmbeddedStyle (line 7) | public class UseEmbeddedStyle : UserControl
    method UseEmbeddedStyle (line 9) | public UseEmbeddedStyle()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: example/HowToUse/HowToUse/App.axaml.cs
  class App (line 7) | public class App : Application
    method Initialize (line 9) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 14) | public override void OnFrameworkInitializationCompleted()

FILE: example/HowToUse/HowToUse/MainWindow.axaml.cs
  class MainWindow (line 7) | public class MainWindow : Window
    method MainWindow (line 9) | public MainWindow()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: example/HowToUse/HowToUse/Program.cs
  class Program (line 5) | class Program
    method Main (line 10) | public static void Main(string[] args) => BuildAvaloniaApp()
    method BuildAvaloniaApp (line 14) | public static AppBuilder BuildAvaloniaApp()

FILE: example/HowToUse/HowToUse/UseBinding.axaml.cs
  class UseBinding (line 7) | public class UseBinding : UserControl
    method UseBinding (line 9) | public UseBinding()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: example/HowToUse/HowToUse/UseBindingViewModel.cs
  class UseBindingViewModel (line 8) | public class UseBindingViewModel : ReactiveObject
    method UseBindingViewModel (line 18) | public UseBindingViewModel()

FILE: example/HowToUse/HowToUse/WriteMarkdownInXaml.axaml.cs
  class WriteMarkdownInXaml (line 7) | public class WriteMarkdownInXaml : UserControl
    method WriteMarkdownInXaml (line 9) | public WriteMarkdownInXaml()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.Base/Apps/App.axaml.cs
  class App (line 19) | public class App : Application
    method Initialize (line 23) | public override void Initialize()
    method OnFrameworkInitializationCompleted (line 28) | public override void OnFrameworkInitializationCompleted()
    method Loaded (line 46) | private void Loaded()
    method Start (line 52) | public static IDisposable Start()
  class AppStarter (line 63) | class AppStarter : IDisposable
    method Start (line 67) | public void Start()
    method Dispose (line 84) | public void Dispose()

FILE: tests/UnitTest.Base/ChangeOutputPathNamer.cs
  class ChangeOutputPathNamer (line 6) | public class ChangeOutputPathNamer : UnitTestFrameworkNamer
    method ChangeOutputPathNamer (line 20) | public ChangeOutputPathNamer(string dir)

FILE: tests/UnitTest.Base/UnitTestBase.cs
  class UnitTestBase (line 15) | public class UnitTestBase
    method UnitTestBase (line 17) | static UnitTestBase()
    method UnitTestBase (line 28) | public UnitTestBase()
    method WaitApplicationStart (line 35) | [SetUp]

FILE: tests/UnitTest.Base/Utils/BrokenXamlWriter.cs
  class BrokenXamlWriter (line 25) | public class BrokenXamlWriter
    method RegisterAssembly (line 38) | public void RegisterAssembly(Assembly asm)
    method GeneratePrefixFor (line 107) | private string GeneratePrefixFor(Assembly asm)
    method GetPrefixFor (line 133) | public string GetPrefixFor(Type type)
    method Collect (line 171) | public ObjectNode Collect(AvaloniaObject obj)
    method CollectChangedValue (line 332) | private IEnumerable<(AvaloniaProperty, object)> CollectChangedValue(Av...
    method BrokenXamlWriter (line 356) | public BrokenXamlWriter()
    method CreateElement (line 362) | private XmlElement CreateElement(string name)
    method CreateElement (line 370) | private XmlElement CreateElement(string prefix, string name)
    method CreateAttribute (line 384) | private XmlAttribute CreateAttribute(string name)
    method CreateAttribute (line 393) | private XmlAttribute CreateAttribute(string prefix, string name)
    method Transform (line 407) | public XmlDocument Transform(object value)
    method ApplyTo (line 428) | private void ApplyTo(XmlNode valueNode, AvaloniaObject value)
    method Append (line 443) | private void Append(XmlNode valueNode, ObjectProperty prop, bool isCon...
  class XmlNamespace (line 517) | class XmlNamespace
    method XmlNamespace (line 523) | public XmlNamespace(string prefix, string nmspc, params ClassNamespace...
    method XmlNamespace (line 528) | public XmlNamespace(string prefix, string nmspc, IEnumerable<ClassName...
  class ClassNamespace (line 535) | class ClassNamespace
    method ClassNamespace (line 540) | public ClassNamespace(Assembly asm, string nmspc)
  class ObjectNode (line 547) | public class ObjectNode
  class ObjectProperty (line 554) | public class ObjectProperty

FILE: tests/UnitTest.Base/Utils/RunOnUIAttribute.cs
  class RunOnUIAttribute (line 11) | [System.AttributeUsage(AttributeTargets.Method, Inherited = true, AllowM...
    method Wrap (line 14) | public TestCommand Wrap(TestCommand command) => new RunOnUICommand(com...
    class RunOnUICommand (line 16) | class RunOnUICommand : DelegatingTestCommand
      method RunOnUICommand (line 18) | public RunOnUICommand(TestCommand innerCommand)
      method Execute (line 23) | public override TestResult Execute(TestExecutionContext context)
      method RunTest (line 51) | private object RunTest(TestExecutionContext context)

FILE: tests/UnitTest.Base/Utils/TextUtil.cs
  class TextUtil (line 7) | public static class TextUtil
    method HereDoc (line 9) | public static string HereDoc(string value)
    method CountIndent (line 58) | private static int CountIndent(string line)

FILE: tests/UnitTest.Base/Utils/Util.cs
  class Util (line 12) | public static class Util
    method GetTextNames (line 14) | public static string[] GetTextNames()
    method LoadText (line 24) | public static string LoadText(string name)
    method AsXaml (line 34) | public static string AsXaml(object instance)
    method GetRuntimeName (line 64) | public static string GetRuntimeName()
    method FindControlsByClassName (line 90) | public static IEnumerable<T> FindControlsByClassName<T>(Control ctrl, ...

FILE: tests/UnitTest.CTxt/UnitTestCTxt.cs
  class UnitTestCTxt (line 28) | public class UnitTestCTxt : UnitTestBase
    method UnitTestCTxt (line 30) | public UnitTestCTxt()
    method GivenTest1_generatesExpectedResult (line 35) | [Test]
    method GivenTest2_generatesExpectedResult (line 50) | [Test]
    method GivenTest3_generatesExpectedResult_sub0 (line 65) | [Test]
    method GivenTest3_generatesExpectedResult_sub1 (line 81) | [Test]
    method GivenTest3_generatesExpectedResult_sub2 (line 97) | [Test]
    method GivenTest3_generatesExpectedResult_sub3 (line 113) | [Test]
    method GivenTest_drawableSomeMds (line 129) | [Test]
    method GivenTestXXX_generatesExpectedResult (line 158) | [RunOnUI]
    method GivenTest4_generatesExpectedResult (line 183) | [Test]
    method GivenTest5_generatesExpectedResult (line 198) | [Test]
    method GivenTest6_generatesExpectedResult (line 213) | [Test]
    method GivenTest7_generatesExpectedResult (line 228) | [Test]
    method GivenTest99_generatesExpectedResult (line 243) | [Test]
  class MetryHolder (line 310) | class MetryHolder : AvaloniaObject
    method MetryHolder (line 340) | public MetryHolder(Control ctxt, int width = 400, int height = 1000)
    method RenderHelper (line 361) | private void RenderHelper(Visual vis, DrawingContext ctx)

FILE: tests/UnitTest.CTxt/Utils/ApprovalImageWriter.cs
  class ApprovalImageWriter (line 10) | public class ApprovalImageWriter : IApprovalWriter
    method ApprovalImageWriter (line 16) | public ApprovalImageWriter(Bitmap image)
    method ApprovalImageWriter (line 20) | public ApprovalImageWriter(string dir, Bitmap image, string suffix)
    method GetApprovalFilename (line 27) | public virtual string GetApprovalFilename(string basename)
    method GetReceivedFilename (line 39) | public virtual string GetReceivedFilename(string basename)
    method WriteReceivedFile (line 53) | public string WriteReceivedFile(string received)

FILE: tests/UnitTest.CTxt/Utils/ImageFileApprover.cs
  class ImageFileApprover (line 15) | public class ImageFileApprover : FileApprover
    method ImageFileApprover (line 17) | public ImageFileApprover(IApprovalWriter writer, IApprovalNamer namer,...
    method Approve (line 22) | public override ApprovalException Approve(string approvedPath, string ...
    method BitmapToByte (line 47) | private byte[] BitmapToByte(Bitmap bmp)
    method Compare (line 67) | private new static bool Compare(ICollection<byte> bytes1, ICollection<...

FILE: tests/UnitTest.CTxt/Xamls/Test1.axaml.cs
  class Test1 (line 7) | public partial class Test1 : UserControl
    method Test1 (line 9) | public Test1()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test2.axaml.cs
  class Test2 (line 7) | public partial class Test2 : UserControl
    method Test2 (line 9) | public Test2()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test3.axaml.cs
  class Test3 (line 7) | public partial class Test3 : UserControl
    method Test3 (line 9) | public Test3()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test4.axaml.cs
  class Test4 (line 7) | public partial class Test4 : UserControl
    method Test4 (line 9) | public Test4()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test5.axaml.cs
  class Test5 (line 7) | public partial class Test5 : UserControl
    method Test5 (line 9) | public Test5()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test6.axaml.cs
  class Test6 (line 7) | public partial class Test6 : UserControl
    method Test6 (line 9) | public Test6()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test7.axaml.cs
  class Test7 (line 7) | public partial class Test7 : UserControl
    method Test7 (line 9) | public Test7()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.CTxt/Xamls/Test99.axaml.cs
  class Test99 (line 7) | public partial class Test99 : UserControl
    method Test99 (line 9) | public Test99()
    method InitializeComponent (line 14) | private void InitializeComponent()

FILE: tests/UnitTest.Md/UnitTestMd.cs
  class UnitTestMd (line 11) | [UseReporter(typeof(DiffReporter))]
    method Transform_givenTest1_generatesExpectedResult (line 14) | [Test]
    method Transform_givenLists1_generatesExpectedResult (line 24) | [Test]
    method Transform_givenLists2_generatesExpectedResult (line 34) | [Test]
    method Transform_givenLists3_generatesExpectedResult (line 44) | [Test]
    method Transform_givenTables1_generatesExpectedResult (line 54) | [Test]
    method Transform_givenHorizontalRules_generatesExpectedResult (line 64) | [Test]
    method Transform_givenLinksInline_generatesExpectedResult (line 74) | [Test]
    method Transform_givenTextStyles_generatesExpectedResult (line 84) | [Test]
    method Transform_givenImages_generatesExpectedResult (line 94) | [Test]
    method Transform_givenBlockqoute_generatesExpectedResult (line 105) | [Test]
    method Transform_givenMixing_generatesExpectedResult (line 116) | [Test]
    method Transform_givenMixing2_generatesExpectedResult (line 127) | [Test]
    method Transform_givenCodes_generatesExpectedResult (line 138) | [Test]
    method Transform_givenContainer_generatesExpectedResult (line 149) | [Test]
    method Transform_givenEmoji (line 160) | [Test]
    method CheckSwitch (line 171) | [Test]
    class EmptyBorder (line 213) | class EmptyBorder : Markdown.Avalonia.Utils.IContainerBlockHandler
      method EmptyBorder (line 217) | public EmptyBorder(string classNm)
      method ProvideControl (line 222) | public Avalonia.Controls.Border ProvideControl(string assetPathRoot,...

FILE: tests/UnitTest.MdHtml/UnitTest.cs
  class UnitTest (line 16) | [UseReporter(typeof(DiffReporter))]
    method Button (line 33) | [Test]
    method CodeBlock (line 46) | [Test]
    method InlineCode (line 59) | [Test]
    method Input (line 72) | [Test]
    method List (line 85) | [Test]
    method Progres (line 98) | [Test]
    method Details (line 111) | [Test]
    method TypicalBlock (line 124) | [Test]
    method TypicalInline (line 137) | [Test]
    method Mixing (line 150) | [Test]

FILE: tests/UnitTest.MdHtml/Utils.cs
  class Utils (line 15) | public static class Utils
    method ReadHtml (line 17) | public static string ReadHtml([CallerMemberName] string fileBaseName =...
    method AsXaml (line 25) | public static string AsXaml(object result)
    method GetRuntimeName (line 30) | public static string GetRuntimeName()

FILE: tests/UnitTest.MdSyntax/UnitTestConverter.cs
  class UnitTestConverter (line 15) | class UnitTestConverter
    method TryConvert (line 17) | [Test]
    method Look (line 59) | private void Look(HighlightingRuleSet ruleSet)

FILE: tests/UnitTest.MdSyntax/UnitTestMdSyntax.cs
  class UnitTestMdSyntax (line 11) | [UseReporter(typeof(DiffReporter))]
    method Transform_givenTest1_generatesExpectedResult (line 14) | [Test]
    method Transform_givenLists1_generatesExpectedResult (line 24) | [Test]
    method Transform_givenLists2_generatesExpectedResult (line 34) | [Test]
    method Transform_givenLists3_generatesExpectedResult (line 44) | [Test]
    method Transform_givenTables1_generatesExpectedResult (line 54) | [Test]
    method Transform_givenHorizontalRules_generatesExpectedResult (line 64) | [Test]
    method Transform_givenLinksInline_generatesExpectedResult (line 74) | [Test]
    method Transform_givenTextStyles_generatesExpectedResult (line 84) | [Test]
    method Transform_givenImages_generatesExpectedResult (line 94) | [Test]
    method Transform_givenBlockqoute_generatesExpectedResult (line 106) | [Test]
    method Transform_givenMixing_generatesExpectedResult (line 117) | [Test]
    method Transform_givenMixing2_generatesExpectedResult (line 129) | [Test]
    method Transform_givenCodes_generatesExpectedResult (line 141) | [Test]
    method Transform_givenContainer_generatesExpectedResult (line 153) | [Test]
    method Transform_givenEmoji (line 165) | [Test]
    method CheckSwitch (line 177) | [Test]
    class EmptyBorder (line 217) | class EmptyBorder : Markdown.Avalonia.Utils.IContainerBlockHandler
      method EmptyBorder (line 221) | public EmptyBorder(string classNm)
      method ProvideControl (line 226) | public Avalonia.Controls.Border ProvideControl(string assetPathRoot,...
Condensed preview — 422 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,438K chars).
[
  {
    "path": ".gitattributes",
    "chars": 483,
    "preview": "# Auto detect text files and perform LF normalization\n* text=auto\n\n# Custom for Visual Studio\n*.cs     diff=csharp\n*.sln"
  },
  {
    "path": ".github/workflows/build.yml",
    "chars": 690,
    "preview": "name: .NET\n\non:\n  pull_request:\n    branches: [ master ]\n  workflow_dispatch:\n\njobs:\n  build:\n    runs-on: windows-lates"
  },
  {
    "path": ".gitignore",
    "chars": 1983,
    "preview": "#################\n## Eclipse\n#################\n\n*.pydevproject\n.project\n.metadata\nbin/\ntmp/\n*.tmp\n*.bak\n*.swp\n*~.nib\nloc"
  },
  {
    "path": "ColorDocument.Avalonia/ClassNames.cs",
    "chars": 1434,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "ColorDocument.Avalonia/ColorDocument.Avalonia.csproj",
    "chars": 954,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <TargetFram"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElement.cs",
    "chars": 1264,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing System.Collections.Generic;\nusing System.Text;\n\nn"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/BlockquoteElement.cs",
    "chars": 2487,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing System;\nusing System.Collections.Generic;\nusing S"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/CTextBlockElement.cs",
    "chars": 2274,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia;\nusing System;\nusing Syste"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/DocumentRootElement.cs",
    "chars": 2258,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing System;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/HeaderElement.cs",
    "chars": 867,
    "preview": "using ColorTextBlock.Avalonia;\nusing System.Collections.Generic;\n\nnamespace ColorDocument.Avalonia.DocumentElements\n{\n "
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/ListBlockElement.cs",
    "chars": 3835,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia;\nusing System;\nusing Syste"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/ListItemElement.cs",
    "chars": 2142,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Syste"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/NoteBlockElement.cs",
    "chars": 1584,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia;\nusing System;\nusing Syste"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/PlainCodeBlockElement.cs",
    "chars": 1611,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Controls.Primitives;\nusing Avalonia.Media;\nusing ColorTextBlock"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/TableBlockElement.cs",
    "chars": 20408,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Syste"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/TableCellElement.cs",
    "chars": 3674,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing Avalonia.Media;\nusing System;\nusing System.Collec"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/TextBlockElement.cs",
    "chars": 2197,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Controls.Documents;\nusing Avalonia.Media;\nusing System;\nusing S"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/TextMarkerStyle.cs",
    "chars": 1562,
    "preview": "using Markdown.Avalonia;\nusing System;\n\nnamespace ColorDocument.Avalonia.DocumentElements\n{\n    public enum TextMarkerS"
  },
  {
    "path": "ColorDocument.Avalonia/DocumentElements/UnBlockElement.cs",
    "chars": 722,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace "
  },
  {
    "path": "ColorDocument.Avalonia/EnumerableExt.cs",
    "chars": 2144,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing S"
  },
  {
    "path": "ColorDocument.Avalonia/NumberToOrder.cs",
    "chars": 1663,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Markdown.Avalonia\n{\n    static class Numb"
  },
  {
    "path": "ColorDocument.Avalonia/RegionUtil.cs",
    "chars": 1944,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\n\nnamespace ColorDocument.Avalonia\n{\n    internal static"
  },
  {
    "path": "ColorDocument.Avalonia/SelectionList.cs",
    "chars": 1983,
    "preview": "using System;\nusing System.Collections;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing S"
  },
  {
    "path": "ColorDocument.Avalonia/SelectionUtil.cs",
    "chars": 5549,
    "preview": "using Avalonia;\nusing Avalonia.Layout;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Co"
  },
  {
    "path": "ColorTextBlock.Avalonia/CBold.cs",
    "chars": 373,
    "preview": "using System.Collections.Generic;\nusing Weight = Avalonia.Media.FontWeight;\n\nnamespace ColorTextBlock.Avalonia\n{\n    //"
  },
  {
    "path": "ColorTextBlock.Avalonia/CCode.cs",
    "chars": 1396,
    "preview": "using System.Collections.Generic;\nusing Avalonia.Media;\nusing Avalonia;\nusing ColorTextBlock.Avalonia.Fonts;\n\nnamespace"
  },
  {
    "path": "ColorTextBlock.Avalonia/CHyperlink.cs",
    "chars": 4669,
    "preview": "using Avalonia;\nusing Avalonia.Input;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia.Geometries;\nusing System;\nusi"
  },
  {
    "path": "ColorTextBlock.Avalonia/CImage.cs",
    "chars": 6253,
    "preview": "using Avalonia;\nusing Avalonia.Media.Imaging;\nusing Avalonia.Platform;\nusing Avalonia.Threading;\nusing ColorTextBlock.A"
  },
  {
    "path": "ColorTextBlock.Avalonia/CInline.cs",
    "chars": 9559,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia.Geo"
  },
  {
    "path": "ColorTextBlock.Avalonia/CInlineUIContainer.cs",
    "chars": 1632,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia.Geometies;\nusing ColorTextBlock.Avalonia.Geometr"
  },
  {
    "path": "ColorTextBlock.Avalonia/CItalic.cs",
    "chars": 381,
    "preview": "using System.Collections.Generic;\nusing FStyle = Avalonia.Media.FontStyle;\n\nnamespace ColorTextBlock.Avalonia\n{\n    ///"
  },
  {
    "path": "ColorTextBlock.Avalonia/CLineBreak.cs",
    "chars": 919,
    "preview": "using Avalonia;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia.Geometries;\nusing System.Collections.Generic;\nusing"
  },
  {
    "path": "ColorTextBlock.Avalonia/CRun.cs",
    "chars": 6676,
    "preview": "using Avalonia;\nusing Avalonia.Media;\nusing Avalonia.Media.TextFormatting;\nusing Avalonia.Media.TextFormatting.Unicode;"
  },
  {
    "path": "ColorTextBlock.Avalonia/CSpan.cs",
    "chars": 9373,
    "preview": "using Avalonia;\nusing Avalonia.Collections;\nusing Avalonia.Controls;\nusing Avalonia.Input;\nusing Avalonia.Media;\nusing "
  },
  {
    "path": "ColorTextBlock.Avalonia/CStrikethrough.cs",
    "chars": 365,
    "preview": "using System.Collections.Generic;\n\nnamespace ColorTextBlock.Avalonia\n{\n    /// <summary>\n    /// Strikethrough decorati"
  },
  {
    "path": "ColorTextBlock.Avalonia/CTextBlock.cs",
    "chars": 37574,
    "preview": "\nusing Avalonia;\nusing Avalonia.Automation.Peers;\nusing Avalonia.Collections;\nusing Avalonia.Controls;\nusing Avalonia.I"
  },
  {
    "path": "ColorTextBlock.Avalonia/CTextBlockAutomationPeer.cs",
    "chars": 726,
    "preview": "using Avalonia.Automation.Peers;\n\nnamespace ColorTextBlock.Avalonia\n{\n    /// <summary>\n    /// The automation peer for"
  },
  {
    "path": "ColorTextBlock.Avalonia/CUnderline.cs",
    "chars": 345,
    "preview": "using System.Collections.Generic;\n\nnamespace ColorTextBlock.Avalonia\n{\n    /// <summary>\n    /// Underline decoration\n "
  },
  {
    "path": "ColorTextBlock.Avalonia/ColorTextBlock.Avalonia.csproj",
    "chars": 775,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <OutputType"
  },
  {
    "path": "ColorTextBlock.Avalonia/Fonts/FontFamilyCollector.cs",
    "chars": 865,
    "preview": "using Avalonia.Media;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n\nnamespace "
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/CGeometry.cs",
    "chars": 2126,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Media;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\n\nnamespace ColorTex"
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/DecoratorGeometry.cs",
    "chars": 8257,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing System;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/DummyGeometryForControl.cs",
    "chars": 1614,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Controls.Documents;\nusing Avalonia.Media;\nusing ColorTextBlock."
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/ImageGeometry.cs",
    "chars": 1698,
    "preview": "using Avalonia;\nusing Avalonia.Media;\nusing Avalonia.Media.Imaging;\nusing System;\nusing System.Diagnostics.CodeAnalysis"
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/LineBreakMarkGeometry.cs",
    "chars": 1539,
    "preview": "using Avalonia;\nusing Avalonia.Controls.Shapes;\nusing Avalonia.Media;\nusing Avalonia.Media.TextFormatting;\nusing System"
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/TextGeometry.cs",
    "chars": 1317,
    "preview": "using Avalonia;\nusing Avalonia.Media;\nusing Avalonia.Media.TextFormatting;\nusing System.Linq;\n\nnamespace ColorTextBlock"
  },
  {
    "path": "ColorTextBlock.Avalonia/Geometies/TextLineGeometry.cs",
    "chars": 3586,
    "preview": "using Avalonia;\nusing Avalonia.Media;\nusing Avalonia.Media.TextFormatting;\nusing System;\nusing System.Diagnostics.CodeA"
  },
  {
    "path": "ColorTextBlock.Avalonia/StringToRunConverter.cs",
    "chars": 685,
    "preview": "using System;\nusing System.ComponentModel;\nusing System.Globalization;\nusing System.Text.RegularExpressions;\n\nnamespace"
  },
  {
    "path": "ColorTextBlock.Avalonia/TextPointer.cs",
    "chars": 5382,
    "preview": "using Avalonia.Media;\nusing ColorTextBlock.Avalonia.Geometries;\nusing System;\nusing System.Collections.Generic;\nusing S"
  },
  {
    "path": "ColorTextBlock.Avalonia/TextVerticalAlignment.cs",
    "chars": 914,
    "preview": "\nnamespace ColorTextBlock.Avalonia\n{\n    /// <summary>\n    /// The vertical position of text within line\n    /// </summ"
  },
  {
    "path": "LICENSE.txt",
    "chars": 1081,
    "preview": "Copyright (c) 2010 Bevan Arps, 2020 Whistyun\n\nPermission is hereby granted, free of charge, to any person obtaining a co"
  },
  {
    "path": "Markdown.Avalonia/Markdown.Avalonia.csproj",
    "chars": 1520,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <TargetFram"
  },
  {
    "path": "Markdown.Avalonia/MarkdownScrollViewer.cs",
    "chars": 354,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "Markdown.Avalonia/MdAvPlugins.cs",
    "chars": 2339,
    "preview": "using Markdown.Avalonia.Html;\nusing Markdown.Avalonia.Plugins;\nusing Markdown.Avalonia.Svg;\nusing Markdown.Avalonia.Syn"
  },
  {
    "path": "Markdown.Avalonia/Properties/AssemblyInfo.cs",
    "chars": 213,
    "preview": "using Avalonia.Metadata;\n\n[assembly: XmlnsDefinition(\"https://github.com/whistyun/Markdown.Avalonia\", \"Markdown.Avaloni"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/ButtonParser.cs",
    "chars": 2329,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nu"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/CodeBlockParser.cs",
    "chars": 2594,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing HtmlAgilityPack;\nusing Markdown.Avalonia.Html.Core.Utils;\nusing Markdown"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/CommentParser.cs",
    "chars": 1116,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing Markdown.Avalonia."
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/DetailsParser.cs",
    "chars": 1989,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Input;\nusing Avalonia.Layout;\nusing HtmlAgilityPack;\nusing Mark"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/HorizontalRuleParser.cs",
    "chars": 875,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing HtmlAgilityPack;\nusing Markdown.Avalonia.Controls;\nusing System.Collecti"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/ITagParser.cs",
    "chars": 1054,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing System.Collections"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/ImageParser.cs",
    "chars": 4382,
    "preview": "using Avalonia;\nusing Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Layout;\nusing ColorTextBlock.Avalon"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/InputParser.cs",
    "chars": 4403,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing System;\nusing Syst"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/OrderListParser.cs",
    "chars": 2570,
    "preview": "using HtmlAgilityPack;\nusing System;\nusing System.Collections.Generic;\nusing Markdown.Avalonia.Html.Core.Utils;\nusing S"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/ProgressParser.cs",
    "chars": 1308,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing System.Collections"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TagIgnoreParser.cs",
    "chars": 1058,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing Markdown.Avalonia."
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TextAreaParser.cs",
    "chars": 1679,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nus"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TextNodeParser.cs",
    "chars": 1287,
    "preview": "using Avalonia;\nusing Avalonia.Controls.Documents;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing Markdown"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TypicalBlockParser.cs",
    "chars": 1333,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing HtmlAgilityPack;\nusing System.Collections.Generic;\nusing System.Linq;\n\nn"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TypicalBlockParser.tsv",
    "chars": 1260,
    "preview": "#HtmlTag   | FlowDocumentTag                    | TagName              | ExtraModify\naddress    | #border              "
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TypicalInlineParser.cs",
    "chars": 1354,
    "preview": "using Avalonia;\nusing ColorTextBlock.Avalonia;\nusing HtmlAgilityPack;\nusing System.Collections.Generic;\nusing System.Li"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TypicalInlineParser.tsv",
    "chars": 1708,
    "preview": "#HtmlTag   | FlowDocumentTag                    | TagName              | ExtraModify\na          | ColorTextBlock.Avalon"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/TypicalParseInfo.cs",
    "chars": 12504,
    "preview": "using Avalonia;\nusing Avalonia.Collections;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing ColorTextBlock.Avalon"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers/UnorderListParser.cs",
    "chars": 2229,
    "preview": "using HtmlAgilityPack;\nusing System.Collections.Generic;\nusing Markdown.Avalonia.Html.Core.Utils;\nusing Avalonia;\nusing"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers.MarkdigExtensions/FigureParser.cs",
    "chars": 1942,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Layout;\nusing HtmlAgilityPack;\nusing Markdown.Avalonia.Html.Cor"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Parsers.MarkdigExtensions/GridTableParser.cs",
    "chars": 6811,
    "preview": "using HtmlAgilityPack;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularExpr"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/ReplaceManager.cs",
    "chars": 18105,
    "preview": "using HtmlAgilityPack;\nusing System;\nusing System.Collections.Generic;\nusing System.Windows.Input;\nusing Markdown.Avalo"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Tags.cs",
    "chars": 1911,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing Engine = Markdown.Avalonia.Markdown;\n\nnamespac"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/TextRange.cs",
    "chars": 375,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Markdown.Avalonia.Html.Core\n{\n    public "
  },
  {
    "path": "Markdown.Avalonia.Html/Core/UnknownTagException.cs",
    "chars": 803,
    "preview": "using HtmlAgilityPack;\nusing System;\n\nnamespace Markdown.Avalonia.Html.Core\n{\n    /// <summary>\n    /// MarkdownFromHtm"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/UnknownTagsOption.cs",
    "chars": 654,
    "preview": "namespace Markdown.Avalonia.Html.Core\n{\n    /// <summary>\n    /// Behavior options about unknown tag.\n    /// </summary"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/DocUtils.cs",
    "chars": 1771,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Layout;\nusing AvaloniaEdit;\nusing ColorTextBlock.Avalonia;\nusing Markdown.Avalo"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/EnumerableExt.cs",
    "chars": 728,
    "preview": "using System.Collections;\nusing System.Collections.Generic;\n\nnamespace Markdown.Avalonia.Html.Core.Utils\n{\n    internal"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/HtmlUtils.cs",
    "chars": 1738,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/Length.cs",
    "chars": 2736,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Text;\nusing System."
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/NodeCollectionExt.cs",
    "chars": 4058,
    "preview": "using HtmlAgilityPack;\nusing System;\nusing System.Collections.Generic;\nusing System.Diagnostics.CodeAnalysis;\nusing Sys"
  },
  {
    "path": "Markdown.Avalonia.Html/Core/Utils/StringExt.cs",
    "chars": 1108,
    "preview": "using System;\nusing System.Net;\n\nnamespace Markdown.Avalonia.Html.Core.Utils\n{\n    internal static class StringExt\n    "
  },
  {
    "path": "Markdown.Avalonia.Html/HtmlBlockParser.cs",
    "chars": 1787,
    "preview": "using Markdown.Avalonia.Html.Core;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\nusing Markdo"
  },
  {
    "path": "Markdown.Avalonia.Html/HtmlInlineParser.cs",
    "chars": 1382,
    "preview": "using ColorTextBlock.Avalonia;\nusing Markdown.Avalonia.Html.Core;\nusing Markdown.Avalonia;\nusing Markdown.Avalonia.Pars"
  },
  {
    "path": "Markdown.Avalonia.Html/HtmlPlugin.cs",
    "chars": 922,
    "preview": "using Markdown.Avalonia.Plugins;\nusing Markdown.Avalonia.SyntaxHigh;\nusing System;\nusing System.Collections.Generic;\nus"
  },
  {
    "path": "Markdown.Avalonia.Html/Markdown.Avalonia.Html.csproj",
    "chars": 1745,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <OutputType>"
  },
  {
    "path": "Markdown.Avalonia.Html/SimpleHtmlUtils.cs",
    "chars": 3940,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Text.RegularExpressions;\n\nnamespace Mar"
  },
  {
    "path": "Markdown.Avalonia.Html/Tables/AutoScaleColumnDefinitions.cs",
    "chars": 8278,
    "preview": "using Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing Sy"
  },
  {
    "path": "Markdown.Avalonia.Html/Tables/Table.cs",
    "chars": 4722,
    "preview": "using Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\n\nnamespace Markdown.Avaloni"
  },
  {
    "path": "Markdown.Avalonia.Html/Tables/TableCell.cs",
    "chars": 1284,
    "preview": "using System;\nusing System.Text;\nusing Avalonia.Media;\nusing Avalonia.Layout;\nusing System.Collections.Generic;\nusing A"
  },
  {
    "path": "Markdown.Avalonia.Svg/Markdown.Avalonia.Svg.csproj",
    "chars": 1175,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <OutputType"
  },
  {
    "path": "Markdown.Avalonia.Svg/Properties/AssemblyInfo.cs",
    "chars": 219,
    "preview": "using Avalonia.Metadata;\n\n[assembly: XmlnsDefinition(\"https://github.com/whistyun/Markdown.Avalonia.Svg\", \"Markdown.Ava"
  },
  {
    "path": "Markdown.Avalonia.Svg/SvgFormat.cs",
    "chars": 237,
    "preview": "using Markdown.Avalonia.Plugins;\n\nnamespace Markdown.Avalonia.Svg\n{\n    public class SvgFormat : IMdAvPlugin\n    {\n    "
  },
  {
    "path": "Markdown.Avalonia.Svg/SvgImageResolver.cs",
    "chars": 1660,
    "preview": "using Avalonia.Media;\nusing Avalonia.Svg;\nusing Markdown.Avalonia.Utils;\nusing System;\nusing System.IO;\nusing System.Re"
  },
  {
    "path": "Markdown.Avalonia.Svg/VectorImage.cs",
    "chars": 2578,
    "preview": "using System;\nusing System.Diagnostics;\nusing Avalonia;\nusing Avalonia.Media;\nusing Avalonia.Svg;\nusing ShimSkiaSharp;\n"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Alias.cs",
    "chars": 795,
    "preview": "using System;\n\nnamespace Markdown.Avalonia.SyntaxHigh\n{\n    public class Alias\n    {\n        public string? Name { get;"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/CodeBlockElement.cs",
    "chars": 2628,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Input;\nusing Avalonia.Layout;\nusing AvaloniaEdit;\nusing ColorDo"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/CodePad.cs",
    "chars": 4073,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Input;\nusing System;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Extensions/HSV.cs",
    "chars": 1933,
    "preview": "using Avalonia.Media;\nusing System;\n\nnamespace Markdown.Avalonia.SyntaxHigh.Extensions\n{\n    struct HSV\n    {\n        p"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Extensions/HighlightWrapper.cs",
    "chars": 4399,
    "preview": "using Avalonia.Media;\nusing AvaloniaEdit.Highlighting;\nusing System;\nusing System.Collections.Generic;\n\nnamespace Markd"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Extensions/MixHighlightingBrush.cs",
    "chars": 2368,
    "preview": "using Avalonia.Media;\nusing AvaloniaEdit.Highlighting;\nusing AvaloniaEdit.Rendering;\nusing System;\n\nnamespace Markdown."
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Extensions/SyntaxHighlightWrapperExtension.cs",
    "chars": 3377,
    "preview": "using Avalonia;\nusing Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Markup.Xaml;\nusing Avalonia.Markup."
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Markdown.Avalonia.SyntaxHigh.csproj",
    "chars": 1688,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <OutputType"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/Properties/AssemblyInfo.cs",
    "chars": 497,
    "preview": "using Avalonia.Metadata;\n\n[assembly: XmlnsDefinition(\"https://github.com/whistyun/Markdown.Avalonia.SyntaxHigh\", \"Markd"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfDefaultTheme.axaml",
    "chars": 1331,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n      xmlns:mde=\"clr-namespace:Markdown.Avalonia.SyntaxHigh.Extensio"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfDefaultTheme.axaml.cs",
    "chars": 345,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentAvalonia.axaml",
    "chars": 1347,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n      xmlns:mde=\"clr-namespace:Markdown.Avalonia.SyntaxHigh.Extensio"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentAvalonia.axaml.cs",
    "chars": 349,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentTheme.axaml",
    "chars": 1326,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n      xmlns:mde=\"clr-namespace:Markdown.Avalonia.SyntaxHigh.Extensio"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleCollections/AppendixOfFluentTheme.axaml.cs",
    "chars": 343,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/StyleEdit.cs",
    "chars": 647,
    "preview": "using Markdown.Avalonia.Plugins;\nusing Avalonia.Styling;\nusing Markdown.Avalonia.SyntaxHigh.StyleCollections;\n\nnamespac"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/SyntaxHighlightProvider.cs",
    "chars": 4147,
    "preview": "using Avalonia.Platform;\nusing Avalonia;\nusing AvaloniaEdit.Highlighting.Xshd;\nusing AvaloniaEdit.Highlighting;\nusing S"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/SyntaxHiglight.cs",
    "chars": 905,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Controls.Primitives;\nusing Avalonia.Layout;\nusing Avalonia.Markup.Xaml.Styling;"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/SyntaxOverride.cs",
    "chars": 3592,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Controls.Primitives;\nusing Avalonia.Layout;\nusing Avalonia.Markup.Xaml.Styling;"
  },
  {
    "path": "Markdown.Avalonia.SyntaxHigh/ThemeDetector.cs",
    "chars": 3336,
    "preview": "using Avalonia;\nusing Avalonia.Markup.Xaml.Styling;\nusing Avalonia.Styling;\n\nnamespace Markdown.Avalonia.SyntaxHigh\n{\n "
  },
  {
    "path": "Markdown.Avalonia.Tight/CascadeDictionary.cs",
    "chars": 1346,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing System;\nusing System.Diagnostics.CodeAnalysis;\nusing System.Security.Cry"
  },
  {
    "path": "Markdown.Avalonia.Tight/ChatAISetup.cs",
    "chars": 624,
    "preview": "using Markdown.Avalonia.Plugins;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/ContainerSwitcher.cs",
    "chars": 1084,
    "preview": "using Avalonia.Collections;\nusing Avalonia.Controls;\nusing Avalonia.Metadata;\nusing Markdown.Avalonia.Utils;\nusing Syst"
  },
  {
    "path": "Markdown.Avalonia.Tight/Controls/AutoScaleColumnDefinitions.cs",
    "chars": 5023,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Remote.Protocol.Viewport;\nusing System;\nusing System.Collection"
  },
  {
    "path": "Markdown.Avalonia.Tight/Controls/Rule.cs",
    "chars": 5147,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing System;\nusing System.Collections.Generic;\nusing Sy"
  },
  {
    "path": "Markdown.Avalonia.Tight/CopyMode.cs",
    "chars": 220,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "Markdown.Avalonia.Tight/EmojiTable.cs",
    "chars": 1707,
    "preview": "using System;\nusing System.Collections.Concurrent;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing Sy"
  },
  {
    "path": "Markdown.Avalonia.Tight/EmojiTable.txt",
    "chars": 10097,
    "preview": "👎\t-1\n👍\t+1\n💯\t100\n🎱\t8ball\n🅰️\ta\n🆎\tab\n🔤\tabc\n🔡\tabcd\n🉑\taccept\n🚡\taerial_tramway\n✈️\tairplane\n⏰\talarm_clock\n👽\talien\n🚑\tambulance\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/EngineUpg.cs",
    "chars": 2386,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Rendering.Composition.Animations;\nusing ColorDocument.Avalonia;\nusing ColorDocu"
  },
  {
    "path": "Markdown.Avalonia.Tight/Extensions/AlphaExtension.cs",
    "chars": 1992,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Markup.Xam"
  },
  {
    "path": "Markdown.Avalonia.Tight/Extensions/ComplementaryExtension.cs",
    "chars": 1845,
    "preview": "using Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Markup.Xaml;\nusing Avalonia.Markup.Xaml.MarkupExten"
  },
  {
    "path": "Markdown.Avalonia.Tight/Extensions/DivideColorExtension.cs",
    "chars": 3212,
    "preview": "using Avalonia;\nusing Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Data.Core;\nusing Avalonia.Markup.Xa"
  },
  {
    "path": "Markdown.Avalonia.Tight/Extensions/MultiplyExtension.cs",
    "chars": 1942,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Data;\nusing Avalonia.Data.Converters;\nusing Avalonia.Markup.Xam"
  },
  {
    "path": "Markdown.Avalonia.Tight/Header.cs",
    "chars": 870,
    "preview": "using System;\n\nnamespace Markdown.Avalonia\n{\n    public class Header : IEquatable<Header>\n    {\n        public int Leve"
  },
  {
    "path": "Markdown.Avalonia.Tight/HeaderScrolled.cs",
    "chars": 119,
    "preview": "namespace Markdown.Avalonia\n{\n    public delegate void HeaderScrolled(object sender, HeaderScrolledEventArgs args);\n}\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/HeaderScrolledEventArgs.cs",
    "chars": 1449,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing System.Linq;\n\nnamespace Mar"
  },
  {
    "path": "Markdown.Avalonia.Tight/IMarkdownEngine.cs",
    "chars": 1430,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Rendering.Composition.Animations;\nusing ColorTextBlock.Avalonia;\nusing Markdown"
  },
  {
    "path": "Markdown.Avalonia.Tight/IMarkdownEngine2.cs",
    "chars": 937,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing ColorTextBlock.Avalonia;\nusing Markdown.Avalonia.Parsers;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/IMarkdownEngineBase.cs",
    "chars": 203,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Threading.Tasks;\n\nna"
  },
  {
    "path": "Markdown.Avalonia.Tight/Markdown.Avalonia.Tight.csproj",
    "chars": 2466,
    "preview": "<Project Sdk=\"Microsoft.NET.Sdk\">\n\n  <Import Project=\"..\\Markdown.Avalonia.props\" />\n\n  <PropertyGroup>\n    <OutputType"
  },
  {
    "path": "Markdown.Avalonia.Tight/Markdown.cs",
    "chars": 44916,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Controls.Primitives;\nusing Avalonia.Layout;\nusing Avalonia.Media"
  },
  {
    "path": "Markdown.Avalonia.Tight/MarkdownScrollViewer.cs",
    "chars": 25983,
    "preview": "using Avalonia;\nusing Avalonia.Controls;\nusing Avalonia.Controls.Primitives;\nusing Avalonia.Controls.Shapes;\nusing Aval"
  },
  {
    "path": "Markdown.Avalonia.Tight/MarkdownStyle.cs",
    "chars": 1109,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Markup.Xaml;\nusing Avalonia.Markup.Xaml.Styling;\nusing Avalonia.Styling;\nusing "
  },
  {
    "path": "Markdown.Avalonia.Tight/MdAvPlugins.cs",
    "chars": 5813,
    "preview": "using Avalonia.Metadata;\nusing Markdown.Avalonia.Plugins;\nusing Markdown.Avalonia.Utils;\nusing Microsoft.VisualBasic;\nu"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/BlockParser.cs",
    "chars": 4886,
    "preview": "using Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text.RegularEx"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/BlockParser2.cs",
    "chars": 959,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing System.Collections.Generic;\nusing System.Linq;\nusing Syste"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/BlockParserExt.cs",
    "chars": 3424,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing ColorTextBl"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/AbstractHeaderParser.cs",
    "chars": 706,
    "preview": "using ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing ColorTextBlock.Avalonia;\nusing Syste"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/AbstractHorizontalParser.cs",
    "chars": 1614,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing Markdown.Av"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/AbstractListParser.cs",
    "chars": 10590,
    "preview": "using ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing Markdown.Avalonia.Utils;\nusing Syste"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/AtxHeaderParser.cs",
    "chars": 1380,
    "preview": "using ColorDocument.Avalonia;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace Markdo"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/BlockquotesParser.cs",
    "chars": 1918,
    "preview": "using ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing System;\nusing System.Collections.Gen"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/CommonHorizontalParser.cs",
    "chars": 1089,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressi"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/CommonListParser.cs",
    "chars": 914,
    "preview": "using ColorDocument.Avalonia;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace Markdo"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/ContainerBlockParser.cs",
    "chars": 1916,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing System.Coll"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/ExtHorizontalParser.cs",
    "chars": 1294,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressi"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/ExtListParser.cs",
    "chars": 1226,
    "preview": "using ColorDocument.Avalonia;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace Markdo"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/FencedCodeBlockParser.cs",
    "chars": 2834,
    "preview": "using Avalonia.Controls.Primitives;\nusing Avalonia.Controls;\nusing Avalonia.Media;\nusing System.Collections.Generic;\nus"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/IndentCodeBlockParser.cs",
    "chars": 1528,
    "preview": "using ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing Markdown.Avalonia.Utils;\nusing Syste"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/NoteParser.cs",
    "chars": 2373,
    "preview": "using Avalonia.Media;\nusing ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElements;\nusing System;\nusing "
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/SetextHeaderParser.cs",
    "chars": 1407,
    "preview": "using ColorDocument.Avalonia;\nusing System.Collections.Generic;\nusing System.Text.RegularExpressions;\n\nnamespace Markdo"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/Builtin/TableParser.cs",
    "chars": 8058,
    "preview": "using Avalonia.Layout;\nusing Avalonia.Media;\nusing ColorDocument.Avalonia;\nusing ColorDocument.Avalonia.DocumentElement"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/InlineParser.cs",
    "chars": 2448,
    "preview": "using Avalonia.Controls;\nusing ColorTextBlock.Avalonia;\nusing System;\nusing System.Collections.Generic;\nusing System.Te"
  },
  {
    "path": "Markdown.Avalonia.Tight/Parsers/ParseStatus.cs",
    "chars": 407,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Markdown.Avalonia.Parsers\n{\n    public st"
  },
  {
    "path": "Markdown.Avalonia.Tight/Plugins/BlockOverride2.cs",
    "chars": 1092,
    "preview": "using Avalonia.Controls;\nusing ColorDocument.Avalonia;\nusing Markdown.Avalonia.Parsers;\nusing System.Collections.Generi"
  },
  {
    "path": "Markdown.Avalonia.Tight/Plugins/IBlockOverrider.cs",
    "chars": 811,
    "preview": "using Avalonia.Controls;\nusing Markdown.Avalonia.Parsers;\nusing System.Collections.Generic;\nusing System.Text.RegularEx"
  },
  {
    "path": "Markdown.Avalonia.Tight/Plugins/IMdAvPlugin.cs",
    "chars": 484,
    "preview": "using Avalonia.Controls;\nusing System;\nusing System.Collections.Generic;\nusing System.Collections.ObjectModel;\nusing Sy"
  },
  {
    "path": "Markdown.Avalonia.Tight/Plugins/IStyleEditor.cs",
    "chars": 228,
    "preview": "using Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace Markdown.Avalonia"
  },
  {
    "path": "Markdown.Avalonia.Tight/Plugins/SetupInfo.cs",
    "chars": 13241,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Media;\nusing Avalonia.Media.Imaging;\nusing Avalonia.Platform;\nusing ColorDocume"
  },
  {
    "path": "Markdown.Avalonia.Tight/Properties/AssemblyInfo.cs",
    "chars": 446,
    "preview": "using Avalonia.Metadata;\n\n[assembly: XmlnsDefinition(\"https://github.com/whistyun/Markdown.Avalonia.Tight\", \"Markdown.A"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/INamedStyle.cs",
    "chars": 163,
    "preview": "namespace Markdown.Avalonia.StyleCollections\n{\n    internal interface INamedStyle\n    {\n        string Name { get; }\n  "
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleDefaultTheme.axaml",
    "chars": 7792,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n        \n      xmlns:md=\"clr-namespace:Markdown.Avalonia;assembly=Ma"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleDefaultTheme.axaml.cs",
    "chars": 463,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentAvalonia.axaml",
    "chars": 7801,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n        \n      xmlns:md=\"clr-namespace:Markdown.Avalonia;assembly=Ma"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentAvalonia.axaml.cs",
    "chars": 470,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentTheme.axaml",
    "chars": 7963,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n        \n      xmlns:md=\"clr-namespace:Markdown.Avalonia;assembly=Ma"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleFluentTheme.axaml.cs",
    "chars": 461,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleGithubLike.axaml",
    "chars": 6780,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n        \n      xmlns:mdc=\"clr-namespace:Markdown.Avalonia.Controls;a"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleGithubLike.axaml.cs",
    "chars": 458,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleStandard.axaml",
    "chars": 6641,
    "preview": "<Styles\n      xmlns=\"https://github.com/avaloniaui\"\n        \n      xmlns:mdc=\"clr-namespace:Markdown.Avalonia.Controls;a"
  },
  {
    "path": "Markdown.Avalonia.Tight/StyleCollections/MarkdownStyleStandard.axaml.cs",
    "chars": 452,
    "preview": "using Avalonia.Markup.Xaml;\nusing Avalonia.Styling;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n"
  },
  {
    "path": "Markdown.Avalonia.Tight/Tables/ITable.cs",
    "chars": 258,
    "preview": "using System.Collections.Generic;\n\nnamespace Markdown.Avalonia.Tables\n{\n    interface ITable\n    {\n        List<ITableC"
  },
  {
    "path": "Markdown.Avalonia.Tight/Tables/ITableCell.cs",
    "chars": 366,
    "preview": "using Avalonia.Media;\nusing Avalonia.Layout;\n\nnamespace Markdown.Avalonia.Tables\n{\n    interface ITableCell\n    {\n     "
  },
  {
    "path": "Markdown.Avalonia.Tight/Tables/TextileTable.cs",
    "chars": 8973,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Text;\nusing System.Linq;\nusing Avalonia.Media;\nusing Avalo"
  },
  {
    "path": "Markdown.Avalonia.Tight/Tables/TextileTableCell.cs",
    "chars": 4062,
    "preview": "using System;\nusing System.Text;\nusing Avalonia.Media;\nusing Avalonia.Layout;\n\nnamespace Markdown.Avalonia.Tables\n{\n   "
  },
  {
    "path": "Markdown.Avalonia.Tight/TextMarkerStyle.cs",
    "chars": 1726,
    "preview": "using ColorDocument.Avalonia.DocumentElements;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nname"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/DefaultBitmapLoader.cs",
    "chars": 4601,
    "preview": "using Avalonia;\nusing Avalonia.Media.Imaging;\nusing Avalonia.Platform;\nusing System;\nusing System.Collections.Concurren"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/DefaultHyperlinkCommand.cs",
    "chars": 1540,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Diagnostics;\nusing System.Runtime.InteropServices;\nusing S"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/DefaultPathResolver.cs",
    "chars": 2778,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Media.Imaging;\nusing Avalonia.Platform;\nusing System;\nusing System.Collections."
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/Helper.cs",
    "chars": 319,
    "preview": "using Avalonia;\nusing Avalonia.Platform;\nusing System;\nusing System.Collections.Generic;\nusing System.Text;\n\nnamespace "
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/IBitmapLoader.cs",
    "chars": 502,
    "preview": "using Avalonia.Media.Imaging;\nusing Avalonia.Platform;\nusing System;\nusing System.Collections.Generic;\nusing System.Tex"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/IContainerBlockHandler.cs",
    "chars": 795,
    "preview": "using Avalonia.Controls;\n\nnamespace Markdown.Avalonia.Utils\n{\n  /// <summary>\n  /// support for Container blocks\n  /// h"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/IImageResolver.cs",
    "chars": 868,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Controls.Shapes;\nusing Avalonia.Media;\nusing Avalonia.Media.Imaging;\nusing Aval"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/IPathResolver.cs",
    "chars": 1206,
    "preview": "using Avalonia.Controls;\nusing Avalonia.Controls.Shapes;\nusing Avalonia.Media;\nusing Avalonia.Media.Imaging;\nusing Aval"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/InterassemblyUtil.cs",
    "chars": 1052,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Reflection;\nusing System.Text;\n\nnamespace Markdown.Avaloni"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/TextUtil.cs",
    "chars": 5713,
    "preview": "using System;\nusing System.Collections.Generic;\nusing System.Linq;\nusing System.Text;\nusing System.Text.RegularExpressi"
  },
  {
    "path": "Markdown.Avalonia.Tight/Utils/ThemeDetector.cs",
    "chars": 2654,
    "preview": "using Avalonia;\nusing Avalonia.Markup.Xaml.Styling;\nusing Avalonia.Styling;\n\n\nnamespace Markdown.Avalonia.Utils\n{\n    s"
  },
  {
    "path": "Markdown.Avalonia.props",
    "chars": 998,
    "preview": "<Project DefaultTargets=\"Build\" xmlns=\"http://schemas.microsoft.com/developer/msbuild/2003\">\n\n  <PropertyGroup>\n    <Pac"
  },
  {
    "path": "Markdown.Avalonia.sln",
    "chars": 20071,
    "preview": "\nMicrosoft Visual Studio Solution File, Format Version 12.00\n# Visual Studio Version 17\nVisualStudioVersion = 17.4.3311"
  },
  {
    "path": "Packages.ps1",
    "chars": 36,
    "preview": "dotnet pack -c Release -o .\\Packages"
  }
]

// ... and 222 more files (download for full content)

About this extraction

This page contains the full source code of the whistyun/Markdown.Avalonia GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 422 files (1.3 MB), approximately 337.4k tokens, and a symbol index with 1240 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!