- Notifications
You must be signed in to change notification settings - Fork237
A Swift package for parsing, building, editing, and analyzing Markdown documents.
License
swiftlang/swift-markdown
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
SwiftMarkdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.
The parser is powered by GitHub-flavored Markdown'scmark-gfm implementation, so it follows the spec closely. As the needs of the community change, the effective dialect implemented by this library may change.
The markup tree provided by this package is comprised of immutable/persistent, thread-safe, copy-on-write value types that only copy substructure that has changed. Other examples of the main strategy behind this library can be seen inSwiftSyntax.
In yourPackage.swift Swift Package Manager manifest, add the following dependency to yourdependencies argument:
.package(url:"https://github.com/swiftlang/swift-markdown.git", branch:"main"),
Add the dependency to any targets you've declared in your manifest:
.target( name:"MyTarget", dependencies:[.product(name:"Markdown",package:"swift-markdown"),]),
To parse a document, useDocument(parsing:), supplying aString orURL:
import Markdownletsource="This is a markup *document*."letdocument=Document(parsing: source)print(document.debugDescription())// Document// └─ Paragraph// ├─ Text "This is a markup "// ├─ Emphasis// │ └─ Text "document"// └─ Text "."
Please see SwiftMarkdown'sdocumentation sitefor more detailed information about the library.
Please see thecontributing guide for more information.
Swift Markdown tracks all bug reports withGitHub Issues.You can use the "Swift-Markdown" component for issues and feature requests specific to Swift Markdown.When you submit a bug report we ask that you follow theSwiftBug Reporting guidelinesand provide as many details as possible.
For feature requests, please feel free to file aGitHub issueor start a discussion on theSwift Forums.
Don't hesitate to submit a feature request if you see a waySwift Markdown can be improved to better meet your needs.
About
A Swift package for parsing, building, editing, and analyzing Markdown documents.
Resources
License
Code of conduct
Contributing
Security policy
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.