コード例 #1
0
        private void CreateHashHeader(Match regexMatch, SourceExtent sourceExtent)
        {
            this.FinishParagraph();

            _currentDocument.AddChildNode(
                new HeadingNode(
                    regexMatch.Groups[2].Value,
                    regexMatch.Groups[1].Value.Length,
                    sourceExtent));
        }
コード例 #2
0
        private void CreateHashHeader(Match regexMatch, SourceExtent sourceExtent)
        {
            this.FinishParagraph();

            _currentDocument.AddChildNode(
                new HeadingNode(
                    regexMatch.Groups[2].Value,
                    regexMatch.Groups[1].Value.Length,
                    sourceExtent,

                    // Detect if a line break after the header exists. Mutiple line breaks will be reduced to one.
                    (regexMatch.Groups[3].Captures.Count > 1) ? SectionFormatOption.LineBreakAfterHeader : SectionFormatOption.None));
        }