Coder Social home page Coder Social logo

georgemp / swift-markdown Goto Github PK

View Code? Open in Web Editor NEW

This project forked from apple/swift-markdown

0.0 0.0 0.0 194 KB

A Swift package for parsing, building, editing, and analyzing Markdown documents.

Home Page: https://apple.github.io/swift-markdown/documentation/markdown

License: Apache License 2.0

Shell 1.52% C 0.19% Swift 98.29%

swift-markdown's Introduction

Swift Markdown

Swift Markdown is a Swift package for parsing, building, editing, and analyzing Markdown documents.

The parser is powered by GitHub-flavored Markdown's cmark-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 in SwiftSyntax.

Getting Started Using Markup

In your Package.swift Swift Package Manager manifest, add the following dependency to your dependencies argument:

.package(url: "https://github.com/apple/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, use Document(parsing:), supplying a String or URL:

import Markdown

let source = "This is a markup *document*."
let document = Document(parsing: source)
print(document.debugDescription())
// Document
// └─ Paragraph
//    ├─ Text "This is a markup "
//    ├─ Emphasis
//    │  └─ Text "document"
//    └─ Text "."

Please see Swift Markdown's documentation site for more detailed information about the library.

Getting Involved

Submitting a Bug Report

Swift Markdown tracks all bug reports with GitHub 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 the Swift Bug Reporting guidelines and provide as many details as possible.

Submitting a Feature Request

For feature requests, please feel free to file a GitHub issue or start a discussion on the Swift Forums.

Don't hesitate to submit a feature request if you see a way Swift Markdown can be improved to better meet your needs.

Contributing to Swift Markdown

Please see the contributing guide for more information.

swift-markdown's People

Contributors

kyle-ye avatar quietmisdreavus avatar franklinsch avatar georgemp avatar ethan-kusters avatar iikeli avatar jakepetroules avatar bitjammer avatar d-ronnqvist avatar ryu0118 avatar rinsuki avatar griffin-stewie avatar christopherweems avatar timtr avatar finestructure avatar samasaur1 avatar compnerd avatar prajwalborkar avatar micpringle avatar giginet avatar jangelsb avatar christianselig avatar greenover avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.