# LineParser

Class in [Yarn.Markup](/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](/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.characterattribute.md)                         | The name of the implicitly-generated `character` attribute.                                                                                                                     |
| [CharacterAttributeNameProperty](/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](/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](/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](/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)](/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.deregistermarkerprocessor.md)                       | Removes any marker processor associated with a given marker name.             |
| [Dispose()](/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.dispose.md)                                                                 |                                                                               |
| [ExpandSubstitutions(string,IList)](/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)](/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)](/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](/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.markupdiagnostic.md) | Represents a diagnostic message produced during markup parsing. |


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.lineparser.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
