CodeEdit icon indicating copy to clipboard operation
CodeEdit copied to clipboard

Fix the order of "don't" and "do" in a code block to ensure consistency.

Open thai-d-v opened this issue 2 years ago • 0 comments

Description

I fixed the Code-Style.md but unfortunately, Gihub doesn't have Pull Request for Wiki. So you can review and pull it (if you want) here 😁 https://github.com/thai-d-v/CodeEdit.wiki.git

Before

/* Valid example */
@Binding var number2: Int = 5
@State private var number1: Int = 4

@Environment(\.color)
private var color

/* Invalid example */
@State
private var number: Int = 4
@Binding
var number2: Int = 5
@Environment(\.color) private var color

After

/* Don't use this */
@State
private var number: Int = 4
@Binding
var number2: Int = 5
@Environment(\.color) private var color

/* Use this instead */
@Binding var number2: Int = 5
@State private var number1: Int = 4

@Environment(\.color)
private var color

To Reproduce

Just a markdown fix for wiki.

Expected Behavior

Consistency in Wiki code blocks.

thai-d-v avatar Oct 07 '23 06:10 thai-d-v