Skip to content

Commit

Permalink
Switch to swift-markdown (#3)
Browse files Browse the repository at this point in the history
Changes:

- Removes embedded `cmark` in favour of [`apple/swift-cmark`](https://github.com/apple/swift-cmark)
- Removes AST code in favour of [`apple/swift-markdown`](https://github.com/apple/swift-markdown)
- Removes DebugVisitor in favour of `document.debugDescription()` from `swift-markdown`
- Support tasklist/checkbox

Later:

- Restore ordered list starts, depends on: swiftlang/swift-markdown#22
- Restore various Down options, depends on: swiftlang/swift-markdown#23
  • Loading branch information
nighthawk authored Mar 12, 2022
1 parent 77e5fb4 commit 909b4c6
Show file tree
Hide file tree
Showing 144 changed files with 382 additions and 32,612 deletions.
18 changes: 18 additions & 0 deletions Package.resolved
Original file line number Diff line number Diff line change
@@ -1,6 +1,24 @@
{
"object": {
"pins": [
{
"package": "cmark-gfm",
"repositoryURL": "https://github.com/apple/swift-cmark.git",
"state": {
"branch": "gfm",
"revision": "fce0dee92a10ec75b65ef4e9ca1b341db4c6d2ea",
"version": null
}
},
{
"package": "swift-markdown",
"repositoryURL": "https://github.com/apple/swift-markdown.git",
"state": {
"branch": "main",
"revision": "caafc56d3794a08c2203fe417b3aff81e2ab2fc1",
"version": null
}
},
{
"package": "SnapshotTesting",
"repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing.git",
Expand Down
22 changes: 5 additions & 17 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,15 @@ let package = Package(
)
],
dependencies: [
.package(
url: "https://github.com/pointfreeco/swift-snapshot-testing.git",
from: "1.9.0"
),
.package(url: "https://github.com/apple/swift-markdown.git", .branch("main")),
.package(url: "https://github.com/pointfreeco/swift-snapshot-testing.git", from: "1.9.0"),
],
targets: [
.target(
name: "libcmark",
dependencies: [],
path: "Sources/cmark",
exclude: [
"include",
"case_fold_switch.inc",
"entities.inc",
"COPYING"
],
publicHeadersPath: "./"
),
.target(
name: "Down",
dependencies: ["libcmark"],
dependencies: [
.product(name: "Markdown", package: "swift-markdown")
],
path: "Sources/Down",
exclude: ["Down.h"],
resources: [
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ For a full description of features, see [`johnxnguyen/Down`](https://github.com/
This fork swaps cmark for cmark-gfm, and supports the following extensions:

- [x] Strikethrough
- [ ] Task lists
- [x] Task lists
- [ ] Tables

### Supports
Expand Down
37 changes: 0 additions & 37 deletions Sources/Down/AST/Nodes/BaseNode.swift

This file was deleted.

21 changes: 0 additions & 21 deletions Sources/Down/AST/Nodes/BlockQuote.swift

This file was deleted.

52 changes: 0 additions & 52 deletions Sources/Down/AST/Nodes/ChildSequence.swift

This file was deleted.

29 changes: 0 additions & 29 deletions Sources/Down/AST/Nodes/Code.swift

This file was deleted.

44 changes: 0 additions & 44 deletions Sources/Down/AST/Nodes/CodeBlock.swift

This file was deleted.

29 changes: 0 additions & 29 deletions Sources/Down/AST/Nodes/CustomBlock.swift

This file was deleted.

28 changes: 0 additions & 28 deletions Sources/Down/AST/Nodes/CustomInline.swift

This file was deleted.

38 changes: 0 additions & 38 deletions Sources/Down/AST/Nodes/Document.swift

This file was deleted.

21 changes: 0 additions & 21 deletions Sources/Down/AST/Nodes/Emphasis.swift

This file was deleted.

21 changes: 0 additions & 21 deletions Sources/Down/AST/Nodes/GFM/Strikethrough.swift

This file was deleted.

Loading

0 comments on commit 909b4c6

Please sign in to comment.