Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Elastic.Documentation.Tooling/DocumentationTooling.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ public static ServiceProvider CreateServiceProvider(ref string[] args, Action<IS
.AddConsole(c => c.FormatterName = "condensed")
);


configure?.Invoke(services);

return services.BuildServiceProvider();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static class CodeBlock
};


public static HashSet<string> Languages => new(
public static HashSet<string> Languages { get; } = new(
LanguageMapping.Keys
.Concat(LanguageMapping.Values
.SelectMany(v => v.Split(',').Select(a => a.Trim()))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@ public override BlockState TryContinue(BlockProcessor processor, Block block)
if (block is not ParagraphBlock paragraphBlock)
return base.TryContinue(processor, block);

var line = paragraphBlock.Lines.ToString();

if (block.Parent is not DirectiveBlock)
return base.TryContinue(processor, block);

// TODO only parse this if no content proceeds it (and not in a code fence)
return line.StartsWith(':')
var lines = paragraphBlock.Lines.Lines;
if (lines.Length < 1)
return base.TryContinue(processor, block);

var line = lines[0];
return line.Slice.AsSpan().StartsWith(':')
? BlockState.BreakDiscard
: base.TryContinue(processor, block);
}
Expand Down