Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# ``Markdown``

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

## Overview

The parser is powered by GitHub-flavored Markdown's [cmark-gfm](https://github.com/github/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 Swift's [lib/Syntax](https://github.com/apple/swift/tree/master/lib/Syntax) and its Swift bindings, [SwiftSyntax](https://github.com/apple/swift-syntax).

## Topics

### Essentials

- ``Markup``
- ``MarkupChildren``
- ``ChildIndexPath``
- ``TypedChildIndexPath``
- ``DirectiveArgument``
- ``DirectiveArgumentText``
- ``Document``
- ``LiteralMarkup``
- ``PlainTextConvertibleMarkup``

### Markup Types

- <doc:BlockMarkup>
- <doc:InlineMarkup>
- ``Aside``

### Infrastructure

- <doc:Infrastructure>

### Visit Markup

- <doc:VisitMarkup>
- <doc:FormatterAndOptions>
28 changes: 28 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown/BlockMarkup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Markup Block Nodes

## Topics

### Block Container Blocks
- ``BlockDirective``
- ``BlockQuote``
- ``CustomBlock``
- ``ListItem``
- ``OrderedList``
- ``UnorderedList``

### Inline Container Blocks
- ``Paragraph``

### Leaf Blocks
- ``Heading``
- ``HTMLBlock``
- ``ThematicBreak``
- ``CodeBlock``

### Tables

- ``Table``
- ``TableCellContainer``

## See Also
- <doc:BlockDirectives>
11 changes: 11 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown/FormatterAndOptions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Formatter and Options

## Topics

### Formatter

- ``MarkupFormatter``

### Options

- ``MarkupDumpOptions``
12 changes: 12 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown/Infrastructure.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Infrastructure

## Topics

### Replacement

- ``Replacement``

### Source

- ``SourceLocation``
- ``SourceRange``
19 changes: 19 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown/InlineMarkup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Markup Inline Nodes

## Topics

### Inline Container
- ``Emphasis``
- ``Image``
- ``Link``
- ``Strikethrough``
- ``Strong``

### Inline Leaves
- ``CustomInline``
- ``InlineCode``
- ``InlineHTML``
- ``LineBreak``
- ``SoftBreak``
- ``SymbolLink``
- ``Text``
17 changes: 17 additions & 0 deletions Sources/Markdown/Markdown.docc/Markdown/VisitMarkup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Visiting Markup

## Topics

### Vistor

- ``MarkupVisitor``

### Walker

``MarkupWalker`` is a default implementation for ``MarkupVisitor``.

- ``MarkupWalker``

### Rewriter

- ``MarkupRewriter``