Skip to content

Commit e312782

Browse files
committed
Changes to docc formatting.
1 parent cba530f commit e312782

File tree

8 files changed

+27
-88
lines changed

8 files changed

+27
-88
lines changed

Sources/Navigate.swift

+1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public struct Navigate: View {
3131
private let replace: Bool
3232

3333
/// - Parameter path: New path to navigate to once the View is rendered.
34+
/// - Parameter replace: if `true` will replace the last path in the history stack with the new path.
3435
public init(to path: String, replace: Bool = true) {
3536
self.path = path
3637
self.replace = replace

Sources/Navigator.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public final class Navigator: ObservableObject {
6868
/// will be printed to the console.
6969
///
7070
/// - Parameter path: Path of the new location to navigate to.
71-
/// - Parameter replace: if `true`, will not add the current location to the history.
71+
/// - Parameter replace: if `true` will replace the last path in the history stack with the new path.
7272
public func navigate(_ path: String, replace: Bool = false) {
7373
let path = resolvePaths(self.path, path)
7474
let previousPath = self.path

Sources/Route.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ final class PathMatcher: ObservableObject {
281281
return cached!
282282
}
283283

284-
func match(glob: String, with path: String, relative: String) throws -> RouteInformation? {
284+
func match(glob: String, with path: String, relative: String = "/") throws -> RouteInformation? {
285285
let compiled = try compileRegex(glob)
286286

287287
var nsrange = NSRange(path.startIndex..<path.endIndex, in: path)
@@ -316,7 +316,7 @@ final class PathMatcher: ObservableObject {
316316
let resolvedGlob = String(path[range])
317317
let matchedPath = String(path[relative.endIndex...])
318318

319-
//print("resolved: \(resolvedGlob), matched: \(matchedPath), relative: \(relative)")
319+
print("resolved: \(resolvedGlob), matched: \(matchedPath), relative: \(relative)")
320320

321321
return RouteInformation(path: resolvedGlob, matchedPath: matchedPath, parameters: parameterValues)
322322
}

Sources/SwiftUIRouter.docc/AnimatingRoutes.md

-70
This file was deleted.
Binary file not shown.
23 KB
Loading

0 commit comments

Comments
 (0)