# RegisterMarkerProcessor(string,IAttributeMarkerProcessor)

Method in [LineParser](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser.md)

## Summary

Registers an object as a marker processor for a given marker name.

```csharp
public void RegisterMarkerProcessor(string attributeName, IAttributeMarkerProcessor markerProcessor)
```

## Remarks

When a marker processor is registered for a marker name, the parser will ask the processor for text to insert into the plain text. This allows users of the [LineParser](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser.md) class to dynamically replace text in a line. The `nomarkup` tag is implemented in this way by the [LineParser](/3.1/api/csharp/yarn.markup/yarn.markup.lineparser.md) class directly; the [Dialogue](/3.1/api/csharp/yarn/yarn.dialogue.md) class uses this mechanism to implement the `select` , `plural` and `ordinal` markers.

## Parameters

| Name                                                                                                                          | Description                                                                    |
| ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
| `string` attributeName                                                                                                        | The name of the marker that should use this marker processor.                  |
| [Yarn.Markup.IAttributeMarkerProcessor](/3.1/api/csharp/yarn.markup/yarn.markup.iattributemarkerprocessor.md) markerProcessor | The object that should be invoked when markers with this name are encountered. |


---

# 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/3.1/api/csharp/yarn.markup/yarn.markup.lineparser/yarn.markup.lineparser.registermarkerprocessor.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.
