Update BlockDirective
extensions
#983
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Bug/issue #, if applicable: N/A
Summary
While looking at #982, I found that there's a better place to keep the list of directive names which we consider removed from content:
swift-docc/Sources/SwiftDocC/Model/DocumentationMarkup.swift
Lines 76 to 82 in 563b958
We already had a file with lists of directive names so it'll be clearer to keep all of them in the same file.
I also noticed that a lot of directive names were missing from
BlockDirective.allDirectiveNames
. I've updated the array to include all the missing directives which I could find.This property is used to throw warnings about directives which are not supported in symbol source documentation.
In the future, I think it would be useful to rework this area of the code so that the arrays don't have to be kept manually up to date as that is quite hard to achieve.
Dependencies
N/A.
Testing
Ran unit tests.
Checklist
Make sure you check off the following items. If they cannot be completed, provide a reason.
[ ] Added testsFunctionality should be unchanged../bin/test
script and it succeeded[ ] Updated documentation if necessaryFunctionality should be unchanged.