Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update BlockDirective extensions #983

Merged
merged 6 commits into from
Aug 5, 2024

Conversation

anferbui
Copy link
Contributor

@anferbui anferbui commented Jul 11, 2024

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:

/// Directives which are removed from the markdown content after being parsed.
private static let directivesRemovedFromContent = [
Comment.directiveName,
Metadata.directiveName,
Options.directiveName,
Redirect.directiveName,
]

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 tests Functionality should be unchanged.
  • Ran the ./bin/test script and it succeeded
  • [ ] Updated documentation if necessary Functionality should be unchanged.

anferbui added 2 commits July 11, 2024 15:41
While looking at swiftlang#982, I found that there's a better place to keep the list of directive names which we consider removed from content -- we already had a file with lists of directive names so it'll be clearer to keep all of them in the same file.
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.
@anferbui
Copy link
Contributor Author

@swift-ci please test

anferbui added 2 commits July 24, 2024 14:55
`directivesRemovedFromContent` was being defined in both `DocumentationMarkup` and `BlockDirective`, removed the duplicate definition.
@anferbui

This comment was marked as duplicate.

@anferbui

This comment was marked as duplicate.

@anferbui anferbui requested a review from d-ronnqvist July 29, 2024 14:37
@anferbui
Copy link
Contributor Author

@swift-ci please test

@anferbui
Copy link
Contributor Author

anferbui commented Aug 5, 2024

@swift-ci please test

@anferbui anferbui merged commit dc2ec9e into swiftlang:main Aug 5, 2024
2 checks passed
@anferbui anferbui deleted the update-block-directive-extensions branch August 5, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants