You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
let formatter =AttributedStringFormatter(markdown: md, styles: markdownStyles)
132
132
let attrStr = formatter.format()
133
133
someLabel.attributedText= attrStr
134
134
@@ -146,4 +146,4 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
146
146
147
147
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
148
148
149
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
149
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Copy file name to clipboardExpand all lines: Sources/MarkdownToAttributedString/AttributedStringFormatter.swift
+12-12Lines changed: 12 additions & 12 deletions
Original file line number
Diff line number
Diff line change
@@ -10,40 +10,40 @@ import Foundation
10
10
11
11
/// A formatter for converting Markdown strings into `NSAttributedString` objects with customizable styling.
12
12
///
13
-
/// Provides an interface for rendering Markdown content as rich text, allowing you to apply custom styles Markdown elements like headings, links, and lists. Uses `MarkdownAttributes` for style definitions and `AttributedStringVisitor` for traversing and rendering the Markdown structure.
13
+
/// Provides an interface for rendering Markdown content as rich text, allowing you to apply custom styles Markdown elements like headings, links, and lists. Uses `MarkdownStyles` for style definitions and `AttributedStringVisitor` for traversing and rendering the Markdown structure.
14
14
///
15
15
publicclassAttributedStringFormatter{
16
16
17
17
publicvaroptions:FormattingOptions
18
18
19
-
privatevarattributes:MarkdownAttributes?
19
+
privatevarstyles:MarkdownStyles?
20
20
21
-
/// Initialize the formatter with a Markdown string and optional styling attributes.
21
+
/// Initialize the formatter with a Markdown string and optional styling.
22
22
///
23
23
/// - Parameters:
24
24
/// - markdown: The Markdown content to be converted.
25
-
/// - attributes: An optional `MarkdownAttributes` object defining styles for the formatted output.
25
+
/// - styles: An optional `MarkdownStyles` object defining styles for the formatted output.
0 commit comments