SourceKitten icon indicating copy to clipboard operation
SourceKitten copied to clipboard

Add markup delimiters supported by Xcode

Open eneko opened this issue 5 years ago • 2 comments

Summary

This PR adds support for documentation markup delimiters supported by Xcode (see full list of markup delimiters).

Code changes

  • Update parseFullXMLDocs method in File.swift to extract Abstract, ThrowsDiscussion and other supported delimiters from XML document
  • Update parseFullXMLDocs to support emphasis by replacing <emphasis> with _
  • Add new keys to SwiftDocKey enum
  • Add SwiftDocMarkupDelimiterTests to test each supported delimiter
  • Update test fixtures as needed

Note: Some fixtures are pending to be updated, will fix soon. Any help by maintainers would be appreciated.

eneko avatar May 30 '20 03:05 eneko

Thanks for the PR!

To update fixtures, you can set the OVERWRITE_FIXTURES or APPEND_FIXTURES environment variables while running the tests.

jpsim avatar May 30 '20 04:05 jpsim

@jpsim @norio-nomura I'm going to need some help getting these fixtures fixed for all Swift versions supported. Any suggestions?

eneko avatar Jun 01 '20 20:06 eneko