Skip to content

mrUlrik/Cackle.BBCode

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cackle.BBCode

A simple BBCode parser written in C#. This library was written with a particular platform in mind that supports BBCodes that have only one potential variable.

Currently the library parses to a object called BBCodeNode. In the future exports to specific file types may be introduced.

Example Usage

var allowedCodes = new List<string> { "b", "i", "u" };
var parser = new BBCodeParser(allowedCodes);
foreach (var node in parser.Parse("Hello [b]World[i]![/i][/b]"))
{
    Console.WriteLine(node.Content);
    foreach (var code in node.Codes)
    {
        Console.WriteLine($"  * {code.Name}");
        Console.WriteLine($"    {code.AttributeValue}");
    }
}

About

A simple C# BBCode parser.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages