> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/3.1/api/csharp/yarn.markup/yarn.markup.lineparser.md).

# LineParser

Class in [Yarn.Markup](/3.1/api/csharp/yarn.markup.md)

Inherits from `System.Object`

## Summary

Parses text and produces markup information.

```csharp
public sealed class LineParser : IDisposable
```

## Fields

| Name                                                                                                                                          | Description                                                                                                                                                                     |
| --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CharacterAttribute](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.characterattribute.md)                         | The name of the implicitly-generated `character` attribute.                                                                                                                     |
| [CharacterAttributeNameProperty](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.characterattributenameproperty.md) | The name of the 'name' property, on the implicitly-generated `character` attribute.                                                                                             |
| [NoMarkupAttribute](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.nomarkupattribute.md)                           | The name of the attribute to use to indicate that no marker processing should occur.                                                                                            |
| [ReplacementMarkerContents](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.replacementmarkercontents.md)           | The name of the property in replacement attributes that contains the text of the attribute.                                                                                     |
| [TrimWhitespaceProperty](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.trimwhitespaceproperty.md)                 | The name of the property to use to signify that trailing whitespace should be trimmed if a tag had preceding whitespace or begins the line. This property must be a bool value. |

## Methods

| Name                                                                                                                                                              | Description                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- |
| [DeregisterMarkerProcessor(string)](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.deregistermarkerprocessor.md)                       | Removes any marker processor associated with a given marker name.             |
| [Dispose()](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.dispose.md)                                                                 |                                                                               |
| [ExpandSubstitutions(string,IList)](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.expandsubstitutions.md)                             | Replaces all substitution markers in a text with the given substitution list. |
| [ParseString(string,string,bool)](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.parsestring.md)                                       | Parses a string of text and produces a markup parse result.                   |
| [RegisterMarkerProcessor(string,IAttributeMarkerProcessor)](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.registermarkerprocessor.md) | Registers an object as a marker processor for a given marker name.            |

## Structs

| Name                                                                                                              | Description                                                     |
| ----------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [MarkupDiagnostic](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.markupdiagnostic.md) | Represents a diagnostic message produced during markup parsing. |
