LotgdFormat 0.6.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package LotgdFormat --version 0.6.2
NuGet\Install-Package LotgdFormat -Version 0.6.2
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LotgdFormat" Version="0.6.2" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add LotgdFormat --version 0.6.2
#r "nuget: LotgdFormat, 0.6.2"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install LotgdFormat as a Cake Addin
#addin nuget:?package=LotgdFormat&version=0.6.2

// Install LotgdFormat as a Cake Tool
#tool nuget:?package=LotgdFormat&version=0.6.2

Technical documentation

Principle

The formatter works by first parsing the text into a list of nodes, then rendering each node in turn.

In rendering, it tries to make compliant HTML, but some tags may be wrongly nested in some cases.

`@This is`0 `ban example`b

Becomes

{
	{ ColorNode, Color = "00FF00" }
	{ TextNode,  Text = "This is" }
	{ ColorCloseNode }
	{ TagNode, Tag = "strong" }
	{ TextNode, Text = "An example" }
	{ TagCloseNode, Tag = "strong" }
}

Becomes:

<span class="c26">
this is
</span>
<strong>
An example
</strong>

When handling the `0 code, the formatter has to backtrack to close and reapply reapply non-color formatting for the following node to produce the correct HTML.

`@This `bis an`0 example`b

Becomes

{
	{ ColorNode, Color = "00FF00" }
	{ TextNode,  Text = "This" }
	{ TagNode, Tag = "strong" }
	{ TextNode,  Text = "is an" }
	{ ColorCloseNode }
	{ TagCloseNode, Tag = "strong" }
	{ TagNode, Tag = "strong" }
	{ TextNode, Text = "example" }
	{ TagCloseNode, Tag = "strong" }
}

Becomes <span style="color: #00FF00">This <strong>is an</strong></span> <strong> example</strong>

<span style="color: #00FF00">
This
<strong>
is an
</strong>
</span>
<strong>
example
</strong>
Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.13.4 93 4/4/2024
0.13.3 92 4/3/2024
0.13.2 89 3/27/2024
0.13.1 95 3/18/2024
0.13.0 59 3/18/2024
0.12.0 98 2/3/2024
0.11.1 128 1/11/2024
0.11.0 182 11/18/2023
0.10.1 93 11/14/2023
0.10.0 98 11/13/2023
0.9.0 98 10/30/2023
0.8.1 139 9/2/2023
0.7.5 159 8/5/2023
0.7.4 140 7/31/2023
0.7.3 273 12/30/2022
0.7.2 275 12/18/2022
0.7.1 267 12/11/2022
0.7.0 281 12/10/2022
0.6.3 278 12/9/2022
0.6.2 287 12/3/2022
0.6.1 299 12/3/2022
0.6.0 286 12/3/2022
0.5.0 306 12/2/2022