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

Swift: empty single-line comments are incorrectly colored #5183

Closed
alex-swiftify opened this issue May 25, 2023 · 0 comments · Fixed by #5184
Closed

Swift: empty single-line comments are incorrectly colored #5183

alex-swiftify opened this issue May 25, 2023 · 0 comments · Fixed by #5184

Comments

@alex-swiftify
Copy link

alex-swiftify commented May 25, 2023

Describe the bug

Empty single-line comments (//) followed by newline are colored differently from comments that have text.

Expected Behavior

Empty // comments should be colored the same as other comments.

Current Behavior

Lines with empty // comments are (incorrectly) colored in purple:
image

Reproduction Steps

  1. Go to https://ace.c9.io/tool/mode_creator.html
  2. Select the "Swift" mode and "XCode" theme.
  3. Paste the following code to the right window:
//
//  Filename.swift
//  Description
//
//  Created by Author on 05/13/2022.
//  Copyright © 2014-2023 Company. All rights reserved.
//

import Foundation
import AppKit

Possible Solution

Adding a space after // fixes the syntax coloring of an empty line.

Additional Information/Context

No response

Ace Version / Browser / OS / Keyboard layout

ACE 1.3.1 / Google Chrome / macOS Ventura 13.3.1 (a), M1 Mac, English (U.S.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant