# RegisterMarkerProcessor(string,IAttributeMarkerProcessor)

Method in [LineParser](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.lineparser)

## 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](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.lineparser) class to dynamically replace text in a line. The `nomarkup` tag is implemented in this way by the [LineParser](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.lineparser) class directly; the [Dialogue](https://docs.yarnspinner.dev/api/csharp/yarn/yarn.dialogue) 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](https://docs.yarnspinner.dev/api/csharp/yarn.markup/yarn.markup.iattributemarkerprocessor) markerProcessor | The object that should be invoked when markers with this name are encountered. |
