Skip to content

Commit cca62f7

Browse files
TimTrbitjammer
authored andcommitted
Fixed the snippets support to use the new standard comment structure, and the @snippet references use the full path to the snippet file
1 parent 6f7c29d commit cca62f7

File tree

6 files changed

+10
-11
lines changed

6 files changed

+10
-11
lines changed

Snippets/Formatting/DefaultFormatting.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Format a parsed Markdown document with default settings.
1+
// Format a parsed Markdown document with default settings.
22

33
import Markdown
44

Snippets/Formatting/MaximumWidth.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Keep lines under a certain length.
1+
// Keep lines under a certain length.
22
import Markdown
33

44
let source = """

Snippets/Parsing/ParseDocumentFile.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
//! Parse the contents of a file by its ``URL`` without having to read
2-
//! its contents yourself.
1+
// Parse the contents of a file by its ``URL`` without having to read its contents yourself.
32

43
import Foundation
54
import Markdown

Snippets/Parsing/ParseDocumentString.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Parse a ``String`` as Markdown
1+
// Parse a ``String`` as Markdown
22

33
import Markdown
44

Snippets/Rewriters/RemoveElementKind.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//! Remove all instances of a kind of element using a `MarkupRewriter`.
1+
// Remove all instances of a kind of element using a `MarkupRewriter`.
22
import Markdown
33

44
// MARK: Hide

Sources/Markdown/Markdown.docc/snippets.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## Parsing
44

5-
@Snippet(path: "swift-markdown/snippets/ParseDocumentString")
6-
@Snippet(path: "swift-markdown/snippets/ParseDocumentFile")
5+
@Snippet(path: "swift-markdown/Snippets/Parsing/ParseDocumentString")
6+
@Snippet(path: "swift-markdown/Snippets/Parsing/ParseDocumentFile")
77

88
## Formatting
99

10-
@Snippet(path: "swift-markdown/snippets/DefaultFormatting"
11-
@Snippet(path: "swift-markdown/snippets/MaximumWidth")
10+
@Snippet(path: "swift-markdown/Snippets/Formatting/DefaultFormatting"
11+
@Snippet(path: "swift-markdown/Snippets/Formatting/MaximumWidth")
1212

1313
## Rewriters
1414

15-
@Snippet(path: "swift-markdown/snippets/RemoveElementKind")
15+
@Snippet(path: "swift-markdown/Snippets/Rewriters/RemoveElementKind")

0 commit comments

Comments
 (0)