Markdown.GetMinimumFenceBackticks Method
- Namespace
- Kampute.DocToolkit.Support
- Assembly
- Kampute.DocToolkit.dll
Definition
Determines the minimum number of backticks required to fence code in Markdown.
public static int GetMinimumFenceBackticks(ReadOnlySpan<char> code)Parameters
codeReadOnlySpan<char>- The code to fence.
Returns
- int
- The minimum number of backticks required to fence the code.
Remarks
If the code contains a sequence of backticks, the fence must have one more backtick than the longest sequence; otherwise, the default backtick count for a fence is 3.
