File: RegexGenerator.g.cs
Project: src\src\Aspire.Cli\Aspire.Cli.Tool.csproj (aspire)
// <auto-generated/>
#nullable enable
#pragma warning disable
 
namespace Aspire.Cli.Commands
{
    partial class ProjectNameValidator
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^[^/\\\\]{1,254}$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Compiled</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of the string.<br/>
        /// ○ Match a character in the set [^/\\] greedily at least 1 and at most 254 times.<br/>
        /// ○ Match if at the end of the string or if before an ending newline.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        internal static partial global::System.Text.RegularExpressions.Regex GetProjectNameRegex() => global::System.Text.RegularExpressions.Generated.GetProjectNameRegex_0.Instance;
    }
}
 
namespace Aspire.Cli.Projects
{
    partial class ProjectUpdater
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>#:sdk\\s+Aspire\\.AppHost\\.Sdk@(?:[\\d\\.\\-a-zA-Z]+|\\*)</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "#:sdk".<br/>
        /// ○ Match a whitespace character atomically at least once.<br/>
        /// ○ Match the string "Aspire.AppHost.Sdk@".<br/>
        /// ○ Match with 2 alternative expressions, atomically.<br/>
        ///     ○ Match a character in the set [\-.A-Za-z\d] atomically at least once.<br/>
        ///     ○ Match '*'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        internal static partial global::System.Text.RegularExpressions.Regex SdkDirectiveRegex() => global::System.Text.RegularExpressions.Generated.SdkDirectiveRegex_1.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^###### (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "###### ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel6Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel6Regex_2.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^##### (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "##### ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel5Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel5Regex_3.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^#### (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "#### ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel4Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel4Regex_4.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^### (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "### ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel3Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel3Regex_5.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^## (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "## ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel2Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel2Regex_6.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>^# (.+?)\\s*$</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Multiline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match if at the beginning of a line.<br/>
        /// ○ Match the string "# ".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '\n' lazily at least once.<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ Match if at the end of a line.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex HeaderLevel1Regex() => global::System.Text.RegularExpressions.Generated.HeaderLevel1Regex_7.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>\\*\\*([^*]+)\\*\\*</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "**".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '*' atomically at least once.<br/>
        /// ○ Match the string "**".<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex BoldDoubleAsterisksRegex() => global::System.Text.RegularExpressions.Generated.BoldDoubleAsterisksRegex_8.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>__([^_]+)__</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "__".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '_' atomically at least once.<br/>
        /// ○ Match the string "__".<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex BoldDoubleUnderscoresRegex() => global::System.Text.RegularExpressions.Generated.BoldDoubleUnderscoresRegex_9.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>(?&lt;!\\*)\\*([^*\\n]+)\\*(?!\\*)</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Zero-width negative lookbehind.<br/>
        ///     ○ Match '*' right-to-left.<br/>
        /// ○ Match '*'.<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character in the set [^\n*] atomically at least once.<br/>
        /// ○ Match '*'.<br/>
        /// ○ Zero-width negative lookahead.<br/>
        ///     ○ Match '*'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex ItalicSingleAsteriskRegex() => global::System.Text.RegularExpressions.Generated.ItalicSingleAsteriskRegex_10.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>(?&lt;!_)_([^_\\n]+)_(?!_)</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Zero-width negative lookbehind.<br/>
        ///     ○ Match '_' right-to-left.<br/>
        /// ○ Match '_'.<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character in the set [^\n_] atomically at least once.<br/>
        /// ○ Match '_'.<br/>
        /// ○ Zero-width negative lookahead.<br/>
        ///     ○ Match '_'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex ItalicSingleUnderscoreRegex() => global::System.Text.RegularExpressions.Generated.ItalicSingleUnderscoreRegex_11.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>~~([^~]+)~~</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "~~".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '~' atomically at least once.<br/>
        /// ○ Match the string "~~".<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex StrikethroughRegex() => global::System.Text.RegularExpressions.Generated.StrikethroughRegex_12.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>```\\s*(.*?)\\s*```</code><br/>
        /// Options:<br/>
        /// <code>RegexOptions.Singleline</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "```".<br/>
        /// ○ Match a whitespace character greedily any number of times.<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match any character lazily any number of times.<br/>
        /// ○ Match a whitespace character atomically any number of times.<br/>
        /// ○ Match the string "```".<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex CodeBlockRegex() => global::System.Text.RegularExpressions.Generated.CodeBlockRegex_13.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>`([^`]+)`</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match '`'.<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than '`' atomically at least once.<br/>
        /// ○ Match '`'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex InlineCodeRegex() => global::System.Text.RegularExpressions.Generated.InlineCodeRegex_14.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>!\\[([^\\]]*)\\]\\(([^)]+)\\)</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match the string "![".<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than ']' atomically any number of times.<br/>
        /// ○ Match the string "](".<br/>
        /// ○ 2nd capture group.<br/>
        ///     ○ Match a character other than ')' atomically at least once.<br/>
        /// ○ Match ')'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex ImageRegex() => global::System.Text.RegularExpressions.Generated.ImageRegex_15.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class MarkdownToSpectreConverter
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>\\[([^\\]]+)\\]\\(([^)]+)\\)</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match '['.<br/>
        /// ○ 1st capture group.<br/>
        ///     ○ Match a character other than ']' atomically at least once.<br/>
        /// ○ Match the string "](".<br/>
        /// ○ 2nd capture group.<br/>
        ///     ○ Match a character other than ')' atomically at least once.<br/>
        /// ○ Match ')'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex LinkRegex() => global::System.Text.RegularExpressions.Generated.LinkRegex_16.Instance;
    }
}
 
namespace Aspire.Cli.Utils
{
    partial class StringUtils
    {
        /// <remarks>
        /// Pattern:<br/>
        /// <code>\\[[^\\]]+\\]</code><br/>
        /// Explanation:<br/>
        /// <code>
        /// ○ Match '['.<br/>
        /// ○ Match a character other than ']' atomically at least once.<br/>
        /// ○ Match ']'.<br/>
        /// </code>
        /// </remarks>
        [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
        private static partial global::System.Text.RegularExpressions.Regex RemoveSpectreFormattingRegex() => global::System.Text.RegularExpressions.Generated.RemoveSpectreFormattingRegex_17.Instance;
    }
}
 
namespace System.Text.RegularExpressions.Generated
{
    using System;
    using System.Buffers;
    using System.CodeDom.Compiler;
    using System.Collections;
    using System.ComponentModel;
    using System.Globalization;
    using System.Runtime.CompilerServices;
    using System.Text.RegularExpressions;
    using System.Threading;
 
    /// <summary>Custom <see cref="Regex"/>-derived type for the GetProjectNameRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class GetProjectNameRegex_0 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly GetProjectNameRegex_0 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private GetProjectNameRegex_0()
        {
            base.pattern = "^[^/\\\\]{1,254}$";
            base.roptions = RegexOptions.Compiled;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 1;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // The pattern is anchored.  Validate the current position and try to match at it only.
                    if (TryFindNextPossibleStartingPosition(inputSpan) && !TryMatchAtCurrentPosition(inputSpan))
                    {
                        base.runtextpos = inputSpan.Length;
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Empty matches aren't possible.
                    if ((uint)pos < (uint)inputSpan.Length)
                    {
                        // The pattern leads with a beginning (\A) anchor.
                        if (pos == 0)
                        {
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    char ch;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of the string.
                    if (pos != 0)
                    {
                        return false; // The input didn't match.
                    }
                    
                    // Match a character in the set [^/\\] greedily at least 1 and at most 254 times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while (iteration < 254 && (uint)iteration < (uint)slice.Length && (((ch = slice[iteration]) != '/') & (ch != '\\')))
                        {
                            iteration++;
                        }
                        
                        if (iteration == 0)
                        {
                            return false; // The input didn't match.
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        charloop_starting_pos++;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            return false; // The input didn't match.
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                    //}
                    
                    // Match if at the end of the string or if before an ending newline.
                    if (pos < inputSpan.Length - 1 || ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n'))
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the SdkDirectiveRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class SdkDirectiveRegex_1 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly SdkDirectiveRegex_1 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private SdkDirectiveRegex_1()
        {
            base.pattern = "#:sdk\\s+Aspire\\.AppHost\\.Sdk@(?:[\\d\\.\\-a-zA-Z]+|\\*)";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 1;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 26 characters.
                    if (pos <= inputSpan.Length - 26)
                    {
                        // The pattern has the literal "#:sdk" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_567123A7ECB4AAE0388E63E7526528AD09621ABAE7CCEC2014051A5130AD6BB2);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    char ch;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "#:sdk".
                    if (!slice.StartsWith("#:sdk"))
                    {
                        return false; // The input didn't match.
                    }
                    
                    // Match a whitespace character atomically at least once.
                    {
                        pos += 5;
                        slice = inputSpan.Slice(pos);
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        if (iteration == 0)
                        {
                            return false; // The input didn't match.
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                    }
                    
                    // Match the string "Aspire.AppHost.Sdk@".
                    if (!slice.StartsWith("Aspire.AppHost.Sdk@"))
                    {
                        return false; // The input didn't match.
                    }
                    
                    // Match with 2 alternative expressions, atomically.
                    {
                        int alternation_starting_pos = pos;
                        
                        // Branch 0
                        {
                            // Match a character in the set [\-.A-Za-z\d] atomically at least once.
                            {
                                pos += 19;
                                slice = inputSpan.Slice(pos);
                                int iteration1 = 0;
                                while ((uint)iteration1 < (uint)slice.Length && ((ch = slice[iteration1]) < 128 ? ("\0\0怀Ͽ\ufffe߿\ufffe߿"[ch >> 4] & (1 << (ch & 0xF))) != 0 : RegexRunner.CharInClass((char)ch, "\0\u0006\u0001-/A[a{\t")))
                                {
                                    iteration1++;
                                }
                                
                                if (iteration1 == 0)
                                {
                                    goto AlternationBranch;
                                }
                                
                                slice = slice.Slice(iteration1);
                                pos += iteration1;
                            }
                            
                            goto AlternationMatch;
                            
                            AlternationBranch:
                            pos = alternation_starting_pos;
                            slice = inputSpan.Slice(pos);
                        }
                        
                        // Branch 1
                        {
                            // Match '*'.
                            if ((uint)slice.Length < 20 || slice[19] != '*')
                            {
                                return false; // The input didn't match.
                            }
                            
                            pos += 20;
                            slice = inputSpan.Slice(pos);
                        }
                        
                        AlternationMatch:;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel6Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel6Regex_2 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel6Regex_2 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel6Regex_2()
        {
            base.pattern = "^###### (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 8 characters.
                    if (pos <= inputSpan.Length - 8)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 8)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "###### " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_894848A1234E305043066E2D66A552AACA27686C054C35D9699139C18E5B3DB5);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "###### ".
                    if (!slice.StartsWith("###### "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 7;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel5Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel5Regex_3 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel5Regex_3 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel5Regex_3()
        {
            base.pattern = "^##### (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 7 characters.
                    if (pos <= inputSpan.Length - 7)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 7)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "##### " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_5D253A32A48530993A97B9DEB977A9109DDFBD20993B2C678C636101B9903C8A);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "##### ".
                    if (!slice.StartsWith("##### "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 6;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel4Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel4Regex_4 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel4Regex_4 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel4Regex_4()
        {
            base.pattern = "^#### (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 6 characters.
                    if (pos <= inputSpan.Length - 6)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 6)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "#### " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_2FD94B242547E29F106FA077BCBBB7FC2BD42C19CE287EB16D8AC42ED5DB910E);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "#### ".
                    if (!slice.StartsWith("#### "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 5;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel3Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel3Regex_5 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel3Regex_5 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel3Regex_5()
        {
            base.pattern = "^### (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 5 characters.
                    if (pos <= inputSpan.Length - 5)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 5)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "### " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_A4C963BB170578370BB4623F27104A3E2FC36BA3B3210B1FCAF5C8A7A3F37A78);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "### ".
                    if (!slice.StartsWith("### "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 4;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel2Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel2Regex_6 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel2Regex_6 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel2Regex_6()
        {
            base.pattern = "^## (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 4 characters.
                    if (pos <= inputSpan.Length - 4)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 4)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "## " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_C6BEBB9889F9271D5BFD3B63D937DC676B72563889D1B15D57D63709843373A7);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "## ".
                    if (!slice.StartsWith("## "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 3;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the HeaderLevel1Regex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class HeaderLevel1Regex_7 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly HeaderLevel1Regex_7 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private HeaderLevel1Regex_7()
        {
            base.pattern = "^# (.+?)\\s*$";
            base.roptions = RegexOptions.Multiline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 3 characters.
                    if (pos <= inputSpan.Length - 3)
                    {
                        // The pattern has a leading beginning-of-line anchor.
                        if (pos > 0 && inputSpan[pos - 1] != '\n')
                        {
                            int newlinePos = inputSpan.Slice(pos).IndexOf('\n');
                            if ((uint)newlinePos > inputSpan.Length - pos - 1)
                            {
                                goto NoMatchFound;
                            }
                            pos += newlinePos + 1;
                            
                            if (pos > inputSpan.Length - 3)
                            {
                                goto NoMatchFound;
                            }
                        }
                        
                        // The pattern has the literal "# " at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_53339BFB4687AA14D0CF6A8C8ED1A555E4345AA09F229600A6A70E3EEBB49575);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    NoMatchFound:
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match if at the beginning of a line.
                    if (pos > 0 && inputSpan[pos - 1] != '\n')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match the string "# ".
                    if (!slice.StartsWith("# "))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    //{
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '\n' lazily at least once.
                        //{
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || slice[0] == '\n')
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            goto CaptureBacktrack;
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // Match if at the end of a line.
                    if ((uint)pos < (uint)inputSpan.Length && inputSpan[pos] != '\n')
                    {
                        goto CharLoopBacktrack;
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the BoldDoubleAsterisksRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class BoldDoubleAsterisksRegex_8 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly BoldDoubleAsterisksRegex_8 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private BoldDoubleAsterisksRegex_8()
        {
            base.pattern = "\\*\\*([^*]+)\\*\\*";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 5 characters.
                    if (pos <= inputSpan.Length - 5)
                    {
                        // The pattern has the literal "**" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_4B938BB3612E6695167AB8A3A3AD73E3F6DB0CC76E502A73DB7C1EC79B5A2092);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "**".
                    if (!slice.StartsWith("**"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '*' atomically at least once.
                        {
                            int iteration = slice.IndexOf('*');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match the string "**".
                    if (!slice.StartsWith("**"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos += 2;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the BoldDoubleUnderscoresRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class BoldDoubleUnderscoresRegex_9 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly BoldDoubleUnderscoresRegex_9 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private BoldDoubleUnderscoresRegex_9()
        {
            base.pattern = "__([^_]+)__";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 5 characters.
                    if (pos <= inputSpan.Length - 5)
                    {
                        // The pattern has the literal "__" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString____Ordinal);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "__".
                    if (!slice.StartsWith("__"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '_' atomically at least once.
                        {
                            int iteration = slice.IndexOf('_');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match the string "__".
                    if (!slice.StartsWith("__"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos += 2;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the ItalicSingleAsteriskRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class ItalicSingleAsteriskRegex_10 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly ItalicSingleAsteriskRegex_10 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private ItalicSingleAsteriskRegex_10()
        {
            base.pattern = "(?<!\\*)\\*([^*\\n]+)\\*(?!\\*)";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 3 characters.
                    if (pos <= inputSpan.Length - 3)
                    {
                        // The pattern begins with a character in the set *.
                        // Find the next occurrence. If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOf('*');
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Zero-width negative lookbehind.
                    {
                        slice = inputSpan.Slice(pos);
                        int negativelookbehind__starting_pos = pos;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        // Match '*' right-to-left.
                        if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] != '*')
                        {
                            goto NegativeLookaroundMatch;
                        }
                        pos--;
                        
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                        
                        NegativeLookaroundMatch:
                        pos = negativelookbehind__starting_pos;
                        slice = inputSpan.Slice(pos);
                    }
                    
                    // Match '*'.
                    if (slice.IsEmpty || slice[0] != '*')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character in the set [^\n*] atomically at least once.
                        {
                            int iteration = slice.IndexOfAny('\n', '*');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match '*'.
                    if (slice.IsEmpty || slice[0] != '*')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Zero-width negative lookahead.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        int negativelookahead__starting_pos = pos;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        // Match '*'.
                        if (slice.IsEmpty || slice[0] != '*')
                        {
                            goto NegativeLookaroundMatch1;
                        }
                        
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                        
                        NegativeLookaroundMatch1:
                        pos = negativelookahead__starting_pos;
                        slice = inputSpan.Slice(pos);
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the ItalicSingleUnderscoreRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class ItalicSingleUnderscoreRegex_11 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly ItalicSingleUnderscoreRegex_11 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private ItalicSingleUnderscoreRegex_11()
        {
            base.pattern = "(?<!_)_([^_\\n]+)_(?!_)";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 3 characters.
                    if (pos <= inputSpan.Length - 3)
                    {
                        // The pattern begins with a character in the set _.
                        // Find the next occurrence. If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOf('_');
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Zero-width negative lookbehind.
                    {
                        slice = inputSpan.Slice(pos);
                        int negativelookbehind__starting_pos = pos;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        // Match '_' right-to-left.
                        if ((uint)(pos - 1) >= inputSpan.Length || inputSpan[pos - 1] != '_')
                        {
                            goto NegativeLookaroundMatch;
                        }
                        pos--;
                        
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                        
                        NegativeLookaroundMatch:
                        pos = negativelookbehind__starting_pos;
                        slice = inputSpan.Slice(pos);
                    }
                    
                    // Match '_'.
                    if (slice.IsEmpty || slice[0] != '_')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character in the set [^\n_] atomically at least once.
                        {
                            int iteration = slice.IndexOfAny('\n', '_');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match '_'.
                    if (slice.IsEmpty || slice[0] != '_')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Zero-width negative lookahead.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        int negativelookahead__starting_pos = pos;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        // Match '_'.
                        if (slice.IsEmpty || slice[0] != '_')
                        {
                            goto NegativeLookaroundMatch1;
                        }
                        
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                        
                        NegativeLookaroundMatch1:
                        pos = negativelookahead__starting_pos;
                        slice = inputSpan.Slice(pos);
                    }
                    
                    // The input matched.
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the StrikethroughRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class StrikethroughRegex_12 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly StrikethroughRegex_12 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private StrikethroughRegex_12()
        {
            base.pattern = "~~([^~]+)~~";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 5 characters.
                    if (pos <= inputSpan.Length - 5)
                    {
                        // The pattern has the literal "~~" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_CD52C9D118B084D434A4D219ABB8EA35B16B26BDCD7FAADC77802968479904D4);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "~~".
                    if (!slice.StartsWith("~~"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '~' atomically at least once.
                        {
                            int iteration = slice.IndexOf('~');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match the string "~~".
                    if (!slice.StartsWith("~~"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos += 2;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the CodeBlockRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class CodeBlockRegex_13 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly CodeBlockRegex_13 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private CodeBlockRegex_13()
        {
            base.pattern = "```\\s*(.*?)\\s*```";
            base.roptions = RegexOptions.Singleline;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 6 characters.
                    if (pos <= inputSpan.Length - 6)
                    {
                        // The pattern has the literal "```" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_ACD1AF3308000737329946CAB3D500C3329228244FA0C355223CB35C8E9ACBE9);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int charloop_capture_pos = 0;
                    int charloop_starting_pos = 0, charloop_ending_pos = 0;
                    int lazyloop_capturepos = 0;
                    int lazyloop_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "```".
                    if (!slice.StartsWith("```"))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // Match a whitespace character greedily any number of times.
                    //{
                        pos += 3;
                        slice = inputSpan.Slice(pos);
                        charloop_starting_pos = pos;
                        
                        int iteration = 0;
                        while ((uint)iteration < (uint)slice.Length && char.IsWhiteSpace(slice[iteration]))
                        {
                            iteration++;
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                        
                        charloop_ending_pos = pos;
                        goto CharLoopEnd;
                        
                        CharLoopBacktrack:
                        UncaptureUntil(charloop_capture_pos);
                        
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                        
                        if (charloop_starting_pos >= charloop_ending_pos)
                        {
                            UncaptureUntil(0);
                            return false; // The input didn't match.
                        }
                        pos = --charloop_ending_pos;
                        slice = inputSpan.Slice(pos);
                        
                        CharLoopEnd:
                        charloop_capture_pos = base.Crawlpos();
                    //}
                    
                    // 1st capture group.
                    //{
                        capture_starting_pos = pos;
                        
                        // Match any character lazily any number of times.
                        //{
                            lazyloop_pos = pos;
                            goto LazyLoopEnd;
                            
                            LazyLoopBacktrack:
                            UncaptureUntil(lazyloop_capturepos);
                            if (Utilities.s_hasTimeout)
                            {
                                base.CheckTimeout();
                            }
                            
                            pos = lazyloop_pos;
                            slice = inputSpan.Slice(pos);
                            if (slice.IsEmpty || false)
                            {
                                goto CharLoopBacktrack;
                            }
                            pos++;
                            slice = inputSpan.Slice(pos);
                            lazyloop_pos = pos;
                            
                            LazyLoopEnd:
                            lazyloop_capturepos = base.Crawlpos();
                        //}
                        
                        base.Capture(1, capture_starting_pos, pos);
                        
                        goto CaptureSkipBacktrack;
                        
                        CaptureBacktrack:
                        goto LazyLoopBacktrack;
                        
                        CaptureSkipBacktrack:;
                    //}
                    
                    // Match a whitespace character atomically any number of times.
                    {
                        int iteration1 = 0;
                        while ((uint)iteration1 < (uint)slice.Length && char.IsWhiteSpace(slice[iteration1]))
                        {
                            iteration1++;
                        }
                        
                        slice = slice.Slice(iteration1);
                        pos += iteration1;
                    }
                    
                    // Match the string "```".
                    if (!slice.StartsWith("```"))
                    {
                        goto CaptureBacktrack;
                    }
                    
                    // The input matched.
                    pos += 3;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the InlineCodeRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class InlineCodeRegex_14 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly InlineCodeRegex_14 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private InlineCodeRegex_14()
        {
            base.pattern = "`([^`]+)`";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 2;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 3 characters.
                    if (pos <= inputSpan.Length - 3)
                    {
                        // The pattern begins with a character in the set `.
                        // Find the next occurrence. If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOf('`');
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match '`'.
                    if (slice.IsEmpty || slice[0] != '`')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than '`' atomically at least once.
                        {
                            int iteration = slice.IndexOf('`');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match '`'.
                    if (slice.IsEmpty || slice[0] != '`')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos++;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the ImageRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class ImageRegex_15 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly ImageRegex_15 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private ImageRegex_15()
        {
            base.pattern = "!\\[([^\\]]*)\\]\\(([^)]+)\\)";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 3;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 6 characters.
                    if (pos <= inputSpan.Length - 6)
                    {
                        // The pattern has the literal "![" at the beginning of the pattern. Find the next occurrence.
                        // If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOfAny(Utilities.s_indexOfString_A35D34A63ABD1CA9D7860076AA22A8E02AF70FE7A4FEF864363EC52527771C59);
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int capture_starting_pos1 = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match the string "![".
                    if (!slice.StartsWith("!["))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than ']' atomically any number of times.
                        {
                            int iteration = slice.IndexOf(']');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match the string "](".
                    if (!slice.StartsWith("]("))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 2nd capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos1 = pos;
                        
                        // Match a character other than ')' atomically at least once.
                        {
                            int iteration1 = slice.IndexOf(')');
                            if (iteration1 < 0)
                            {
                                iteration1 = slice.Length;
                            }
                            
                            if (iteration1 == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration1);
                            pos += iteration1;
                        }
                        
                        base.Capture(2, capture_starting_pos1, pos);
                    }
                    
                    // Match ')'.
                    if (slice.IsEmpty || slice[0] != ')')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos++;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the LinkRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class LinkRegex_16 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly LinkRegex_16 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private LinkRegex_16()
        {
            base.pattern = "\\[([^\\]]+)\\]\\(([^)]+)\\)";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 3;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 6 characters.
                    if (pos <= inputSpan.Length - 6)
                    {
                        // The pattern begins with a character in the set [.
                        // Find the next occurrence. If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOf('[');
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    int capture_starting_pos = 0;
                    int capture_starting_pos1 = 0;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match '['.
                    if (slice.IsEmpty || slice[0] != '[')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 1st capture group.
                    {
                        pos++;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos = pos;
                        
                        // Match a character other than ']' atomically at least once.
                        {
                            int iteration = slice.IndexOf(']');
                            if (iteration < 0)
                            {
                                iteration = slice.Length;
                            }
                            
                            if (iteration == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration);
                            pos += iteration;
                        }
                        
                        base.Capture(1, capture_starting_pos, pos);
                    }
                    
                    // Match the string "](".
                    if (!slice.StartsWith("]("))
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // 2nd capture group.
                    {
                        pos += 2;
                        slice = inputSpan.Slice(pos);
                        capture_starting_pos1 = pos;
                        
                        // Match a character other than ')' atomically at least once.
                        {
                            int iteration1 = slice.IndexOf(')');
                            if (iteration1 < 0)
                            {
                                iteration1 = slice.Length;
                            }
                            
                            if (iteration1 == 0)
                            {
                                UncaptureUntil(0);
                                return false; // The input didn't match.
                            }
                            
                            slice = slice.Slice(iteration1);
                            pos += iteration1;
                        }
                        
                        base.Capture(2, capture_starting_pos1, pos);
                    }
                    
                    // Match ')'.
                    if (slice.IsEmpty || slice[0] != ')')
                    {
                        UncaptureUntil(0);
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos++;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                    
                    // <summary>Undo captures until it reaches the specified capture position.</summary>
                    [MethodImpl(MethodImplOptions.AggressiveInlining)]
                    void UncaptureUntil(int capturePosition)
                    {
                        while (base.Crawlpos() > capturePosition)
                        {
                            base.Uncapture();
                        }
                    }
                }
            }
        }
 
    }
    
    /// <summary>Custom <see cref="Regex"/>-derived type for the RemoveSpectreFormattingRegex method.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file sealed class RemoveSpectreFormattingRegex_17 : Regex
    {
        /// <summary>Cached, thread-safe singleton instance.</summary>
        internal static readonly RemoveSpectreFormattingRegex_17 Instance = new();
    
        /// <summary>Initializes the instance.</summary>
        private RemoveSpectreFormattingRegex_17()
        {
            base.pattern = "\\[[^\\]]+\\]";
            base.roptions = RegexOptions.None;
            ValidateMatchTimeout(Utilities.s_defaultTimeout);
            base.internalMatchTimeout = Utilities.s_defaultTimeout;
            base.factory = new RunnerFactory();
            base.capsize = 1;
        }
            
        /// <summary>Provides a factory for creating <see cref="RegexRunner"/> instances to be used by methods on <see cref="Regex"/>.</summary>
        private sealed class RunnerFactory : RegexRunnerFactory
        {
            /// <summary>Creates an instance of a <see cref="RegexRunner"/> used by methods on <see cref="Regex"/>.</summary>
            protected override RegexRunner CreateInstance() => new Runner();
        
            /// <summary>Provides the runner that contains the custom logic implementing the specified regular expression.</summary>
            private sealed class Runner : RegexRunner
            {
                /// <summary>Scan the <paramref name="inputSpan"/> starting from base.runtextstart for the next match.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                protected override void Scan(ReadOnlySpan<char> inputSpan)
                {
                    // Search until we can't find a valid starting position, we find a match, or we reach the end of the input.
                    while (TryFindNextPossibleStartingPosition(inputSpan) &&
                           !TryMatchAtCurrentPosition(inputSpan) &&
                           base.runtextpos != inputSpan.Length)
                    {
                        base.runtextpos++;
                        if (Utilities.s_hasTimeout)
                        {
                            base.CheckTimeout();
                        }
                    }
                }
        
                /// <summary>Search <paramref name="inputSpan"/> starting from base.runtextpos for the next location a match could possibly start.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if a possible match was found; false if no more matches are possible.</returns>
                private bool TryFindNextPossibleStartingPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    
                    // Any possible match is at least 3 characters.
                    if (pos <= inputSpan.Length - 3)
                    {
                        // The pattern begins with a character in the set [.
                        // Find the next occurrence. If it can't be found, there's no match.
                        int i = inputSpan.Slice(pos).IndexOf('[');
                        if (i >= 0)
                        {
                            base.runtextpos = pos + i;
                            return true;
                        }
                    }
                    
                    // No match found.
                    base.runtextpos = inputSpan.Length;
                    return false;
                }
        
                /// <summary>Determine whether <paramref name="inputSpan"/> at base.runtextpos is a match for the regular expression.</summary>
                /// <param name="inputSpan">The text being scanned by the regular expression.</param>
                /// <returns>true if the regular expression matches at the current position; otherwise, false.</returns>
                private bool TryMatchAtCurrentPosition(ReadOnlySpan<char> inputSpan)
                {
                    int pos = base.runtextpos;
                    int matchStart = pos;
                    ReadOnlySpan<char> slice = inputSpan.Slice(pos);
                    
                    // Match '['.
                    if (slice.IsEmpty || slice[0] != '[')
                    {
                        return false; // The input didn't match.
                    }
                    
                    // Match a character other than ']' atomically at least once.
                    {
                        int iteration = slice.Slice(1).IndexOf(']');
                        if (iteration < 0)
                        {
                            iteration = slice.Length - 1;
                        }
                        
                        if (iteration == 0)
                        {
                            return false; // The input didn't match.
                        }
                        
                        slice = slice.Slice(iteration);
                        pos += iteration;
                    }
                    
                    // Match ']'.
                    if ((uint)slice.Length < 2 || slice[1] != ']')
                    {
                        return false; // The input didn't match.
                    }
                    
                    // The input matched.
                    pos += 2;
                    base.runtextpos = pos;
                    base.Capture(0, matchStart, pos);
                    return true;
                }
            }
        }
 
    }
    
    /// <summary>Helper methods used by generated <see cref="Regex"/>-derived implementations.</summary>
    [GeneratedCodeAttribute("System.Text.RegularExpressions.Generator", "10.0.13.307")]
    file static class Utilities
    {
        /// <summary>Default timeout value set in <see cref="AppContext"/>, or <see cref="Regex.InfiniteMatchTimeout"/> if none was set.</summary>
        internal static readonly TimeSpan s_defaultTimeout = AppContext.GetData("REGEX_DEFAULT_MATCH_TIMEOUT") is TimeSpan timeout ? timeout : Regex.InfiniteMatchTimeout;
        
        /// <summary>Whether <see cref="s_defaultTimeout"/> is non-infinite.</summary>
        internal static readonly bool s_hasTimeout = s_defaultTimeout != Regex.InfiniteMatchTimeout;
        
        /// <summary>Supports searching for the string "#### ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_2FD94B242547E29F106FA077BCBBB7FC2BD42C19CE287EB16D8AC42ED5DB910E = SearchValues.Create(["#### "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "**".</summary>
        internal static readonly SearchValues<string> s_indexOfString_4B938BB3612E6695167AB8A3A3AD73E3F6DB0CC76E502A73DB7C1EC79B5A2092 = SearchValues.Create(["**"], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "# ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_53339BFB4687AA14D0CF6A8C8ED1A555E4345AA09F229600A6A70E3EEBB49575 = SearchValues.Create(["# "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "#:sdk".</summary>
        internal static readonly SearchValues<string> s_indexOfString_567123A7ECB4AAE0388E63E7526528AD09621ABAE7CCEC2014051A5130AD6BB2 = SearchValues.Create(["#:sdk"], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "##### ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_5D253A32A48530993A97B9DEB977A9109DDFBD20993B2C678C636101B9903C8A = SearchValues.Create(["##### "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "###### ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_894848A1234E305043066E2D66A552AACA27686C054C35D9699139C18E5B3DB5 = SearchValues.Create(["###### "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "![".</summary>
        internal static readonly SearchValues<string> s_indexOfString_A35D34A63ABD1CA9D7860076AA22A8E02AF70FE7A4FEF864363EC52527771C59 = SearchValues.Create(["!["], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "### ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_A4C963BB170578370BB4623F27104A3E2FC36BA3B3210B1FCAF5C8A7A3F37A78 = SearchValues.Create(["### "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "```".</summary>
        internal static readonly SearchValues<string> s_indexOfString_ACD1AF3308000737329946CAB3D500C3329228244FA0C355223CB35C8E9ACBE9 = SearchValues.Create(["```"], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "## ".</summary>
        internal static readonly SearchValues<string> s_indexOfString_C6BEBB9889F9271D5BFD3B63D937DC676B72563889D1B15D57D63709843373A7 = SearchValues.Create(["## "], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "~~".</summary>
        internal static readonly SearchValues<string> s_indexOfString_CD52C9D118B084D434A4D219ABB8EA35B16B26BDCD7FAADC77802968479904D4 = SearchValues.Create(["~~"], StringComparison.Ordinal);
        
        /// <summary>Supports searching for the string "__".</summary>
        internal static readonly SearchValues<string> s_indexOfString____Ordinal = SearchValues.Create(["__"], StringComparison.Ordinal);
    }
}