Skip to content

Commit b6a9d74

Browse files
committed
dotnet format
1 parent 3ad5699 commit b6a9d74

File tree

2 files changed

+25
-24
lines changed

2 files changed

+25
-24
lines changed

src/Elastic.Markdown/Myst/InlineParsers/InlineAnchorParser.cs

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -35,35 +35,36 @@ public void Setup(MarkdownPipeline pipeline, IMarkdownRenderer renderer) =>
3535

3636
public class InlineAnchorParser : InlineParser
3737
{
38-
public InlineAnchorParser()
39-
{
40-
OpeningCharacters = ['$'];
41-
}
38+
public InlineAnchorParser()
39+
{
40+
OpeningCharacters = ['$'];
41+
}
4242

43-
public override bool Match(InlineProcessor processor, ref StringSlice slice)
44-
{
45-
var startPosition = processor.GetSourcePosition(slice.Start, out var line, out var column);
46-
var c = slice.CurrentChar;
43+
public override bool Match(InlineProcessor processor, ref StringSlice slice)
44+
{
45+
var startPosition = processor.GetSourcePosition(slice.Start, out var line, out var column);
46+
var c = slice.CurrentChar;
4747

48-
var span = slice.AsSpan();
49-
if (!span.StartsWith("$$$")) return false;
48+
var span = slice.AsSpan();
49+
if (!span.StartsWith("$$$"))
50+
return false;
5051

51-
var closingStart = span[3..].IndexOf('$');
52-
if (closingStart <= 0)
53-
return false;
52+
var closingStart = span[3..].IndexOf('$');
53+
if (closingStart <= 0)
54+
return false;
5455

55-
//not ending with three dollar signs
56-
if (!span[(closingStart+3)..].StartsWith("$$$"))
57-
return false;
56+
//not ending with three dollar signs
57+
if (!span[(closingStart + 3)..].StartsWith("$$$"))
58+
return false;
5859

59-
processor.Inline = new InlineAnchor { Anchor = span[3..(closingStart+3)].ToString().Slugify() };
60+
processor.Inline = new InlineAnchor { Anchor = span[3..(closingStart + 3)].ToString().Slugify() };
6061

61-
var sliceEnd = slice.Start + closingStart + 6;
62-
while (slice.Start != sliceEnd)
63-
slice.SkipChar();
62+
var sliceEnd = slice.Start + closingStart + 6;
63+
while (slice.Start != sliceEnd)
64+
slice.SkipChar();
6465

65-
return true;
66-
}
66+
return true;
67+
}
6768

6869

6970
}

src/Elastic.Markdown/Myst/SectionedHeadingRenderer.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// Licensed to Elasticsearch B.V under one or more agreements.
22
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
33
// See the LICENSE file in the project root for more information
4+
using Elastic.Markdown.Helpers;
5+
using Elastic.Markdown.Myst.InlineParsers;
46
using Markdig.Renderers;
57
using Markdig.Renderers.Html;
68
using Markdig.Syntax;
7-
using Elastic.Markdown.Helpers;
8-
using Elastic.Markdown.Myst.InlineParsers;
99

1010
namespace Elastic.Markdown.Myst;
1111

0 commit comments

Comments
 (0)