From 21ad543c9a967c5414a5511c17bf187a02e35e10 Mon Sep 17 00:00:00 2001 From: stzn Date: Sun, 1 Jan 2023 06:51:50 +0900 Subject: [PATCH] fix typo assesment -> assessment --- .../Rendering/Navigation Tree/RenderHierarchyTranslator.swift | 4 ++-- Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift | 4 ++-- .../Semantics/ExternalLinks/ExternalReferenceWalker.swift | 4 ++-- Sources/SwiftDocC/Semantics/Walker/SemanticWalker.swift | 2 +- .../SwiftDocC/SwiftDocC.docc/Resources/RenderNode.spec.json | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchyTranslator.swift b/Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchyTranslator.swift index bac7ba2284..25a9c28311 100644 --- a/Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchyTranslator.swift +++ b/Sources/SwiftDocC/Model/Rendering/Navigation Tree/RenderHierarchyTranslator.swift @@ -168,12 +168,12 @@ struct RenderHierarchyTranslator { renderHierarchyTutorial.landmarks.append(RenderHierarchyLandmark(reference: RenderReferenceIdentifier(assessmentReference.absoluteString), kind: .assessment)) let urlGenerator = PresentationURLGenerator(context: context, baseURL: bundle.baseURL) - let assesmentLinkReference = LinkReference( + let assessmentLinkReference = LinkReference( identifier: RenderReferenceIdentifier(assessmentReference.absoluteString), title: "Check Your Understanding", url: urlGenerator.presentationURLForReference(assessmentReference).relativeString ) - linkReferences[assessmentReference.absoluteString] = assesmentLinkReference + linkReferences[assessmentReference.absoluteString] = assessmentLinkReference } return renderHierarchyTutorial diff --git a/Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift b/Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift index 95c9fccbd4..2f666be237 100644 --- a/Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift +++ b/Sources/SwiftDocC/Model/Rendering/RenderNodeTranslator.swift @@ -170,8 +170,8 @@ public struct RenderNodeTranslator: SemanticVisitor { } node.sections.append(tutorialSections) - if let assesments = tutorial.assessments { - node.sections.append(visitAssessments(assesments) as! TutorialAssessmentsRenderSection) + if let assessments = tutorial.assessments { + node.sections.append(visitAssessments(assessments) as! TutorialAssessmentsRenderSection) } // We guarantee there will be at least 1 path with at least 4 nodes in that path if the tutorial is curated. diff --git a/Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift b/Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift index 31ee1676c2..916d52aeae 100644 --- a/Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift +++ b/Sources/SwiftDocC/Semantics/ExternalLinks/ExternalReferenceWalker.swift @@ -72,8 +72,8 @@ struct ExternalReferenceWalker: SemanticVisitor { mutating func visitTutorial(_ tutorial: Tutorial) { visit(tutorial.intro) tutorial.sections.forEach { visit($0) } - if let assesments = tutorial.assessments { - visit(assesments) + if let assessments = tutorial.assessments { + visit(assessments) } } diff --git a/Sources/SwiftDocC/Semantics/Walker/SemanticWalker.swift b/Sources/SwiftDocC/Semantics/Walker/SemanticWalker.swift index eb7cf165df..c100116bcf 100644 --- a/Sources/SwiftDocC/Semantics/Walker/SemanticWalker.swift +++ b/Sources/SwiftDocC/Semantics/Walker/SemanticWalker.swift @@ -38,7 +38,7 @@ extension SemanticWalker { mutating func visitAssessments(_ assessments: Assessments) { descendIntoChildren(of: assessments) } /// Visits a multiple-choice question. mutating func visitMultipleChoice(_ multipleChoice: MultipleChoice) { descendIntoChildren(of: multipleChoice) } - /// Visits an assesment justification. + /// Visits an assessment justification. mutating func visitJustification(_ justification: Justification) { descendIntoChildren(of: justification) } /// Visits a single choice in a multiple-choice question. mutating func visitChoice(_ choice: Choice) { descendIntoChildren(of: choice) } diff --git a/Sources/SwiftDocC/SwiftDocC.docc/Resources/RenderNode.spec.json b/Sources/SwiftDocC/SwiftDocC.docc/Resources/RenderNode.spec.json index 1981c5da21..d2b1a6805a 100644 --- a/Sources/SwiftDocC/SwiftDocC.docc/Resources/RenderNode.spec.json +++ b/Sources/SwiftDocC/SwiftDocC.docc/Resources/RenderNode.spec.json @@ -1936,7 +1936,7 @@ }, "sections": { "type": "string", - "enum": ["task", "assesment", "heading"] + "enum": ["task", "assessment", "heading"] } } },