Skip to content

Conversation

@mportiz08
Copy link
Contributor

Bug/issue #, if applicable: 108798969

Summary

This changes the behavior introduced with #618 to render all attributes on a single line as opposed to each one getting its own line.

Example:

// before
@discardableResult @objc(baz) func foobarbaz() -> Int

// after
@discardableResult @objc(baz)
func foobarbaz() -> Int

Testing

Same testing instructions as #618 but verify that attributes are now all on one line as opposed to each getting their own line.

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

mportiz08 added 2 commits May 2, 2023 15:14
A previous change was made so that each attribute was broken onto its
own line, but this attempts to collapse all attributes onto their own
single line.

Example:

```swift
// before
@discardableResult @objc(bar) func foo() -> Int

// after
@discardableResult @objc(bar)
func foo() -> Int
```
Assertions are now made on the actual formatted text for better accuracy
and improved readability.
Copy link
Contributor

@dobromir-hristov dobromir-hristov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good, left minor suggestion.

Assertions are MUCH better. Thank you 🙇

@mportiz08
Copy link
Contributor Author

@swift-ci test

@mportiz08 mportiz08 merged commit e14a599 into swiftlang:main May 5, 2023
mportiz08 added a commit to mportiz08/swift-docc-render that referenced this pull request May 5, 2023
…wiftlang#633)

A previous change was made so that each attribute was broken onto its
own line, but this attempts to collapse all attributes onto their own
single line.

Example:

```swift
// before
@discardableResult @objc(bar) func foo() -> Int

// after
@discardableResult @objc(bar)
func foo() -> Int
```

Resolves: rdar://108798969
mportiz08 added a commit that referenced this pull request May 9, 2023
…633) (#641)

A previous change was made so that each attribute was broken onto its
own line, but this attempts to collapse all attributes onto their own
single line.

Example:

```swift
// before
@discardableResult @objc(bar) func foo() -> Int

// after
@discardableResult @objc(bar)
func foo() -> Int
```

Resolves: rdar://108798969
@mportiz08 mportiz08 deleted the render-all-attributes-on-one-line branch May 9, 2023 23:15
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.

4 participants