---
title: markdownSourcePosition
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/key/markdownsourceposition
---

# markdownSourcePosition

The position in a Markdown source string corresponding to some attributed text.

## Declaration

```swift
static let markdownSourcePosition: NSAttributedString.Key
```

## Discussion

Discussion This attribute indicates the position in the Markdown source where a run of attributed text begins and ends, omitting markup characters in the source. For example, after parsing the source string “This is *emphasized*.”, the text emphasized has a Markdown source position that starts at column 10. This index is the “e” character, not the “*” formatting character. An attributed string parsed from Markdown text includes this attribute only if the appliesSourcePositionAttributes value in the directory of NSAttributedString.DocumentReadingOptionKey options provided to the NSAttributedString initializer is YES.

## See Also

### Getting Markdown attribute keys

- [inlinePresentationIntent](foundation/nsattributedstring/key/inlinepresentationintent.md)
- [presentationIntentAttributeName](foundation/nsattributedstring/key/presentationintentattributename.md)
- [alternateDescription](foundation/nsattributedstring/key/alternatedescription.md)
- [imageURL](foundation/nsattributedstring/key/imageurl.md)
