Acode icon indicating copy to clipboard operation
Acode copied to clipboard

Code cannot be formatted normally.

Open XiaoluoFoxington opened this issue 6 months ago • 1 comments

Check for existing issues

  • [x] Completed

Describe the bug / provide steps to reproduce it

Image Image

index.html.zip

Environment

Device Information: WebView Info: Package Name: com.google.android.webview Version: 137.0.7151.61

App Info: Name: Acode Package Name: com.foxdebug.acode Version: 1.11.4-beta Version Code: 960

Device Info: Android Version: 9 Manufacturer: vivo Model: V1809A Platform: Android Cordova Version: 14.0.1

Screen Info: Width: 540 Height: 1170 Color Depth: 24

Additional Info: Language: zh-CN User Agent: Mozilla/5.0 (Linux; Android 9; V1809A Build/PKQ1.181030.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/137.0.7151.61 Mobile Safari/537.36

If applicable, add mockups / screenshots regarding your vision

No response

If applicable, attach your Acode.log file to this issue.

Acode.log

XiaoluoFoxington avatar Jun 09 '25 18:06 XiaoluoFoxington

The formatting tool has compatibility issues with HTML self-closing tags (e.g., <img src="..." />). When it encounters the "/" in such tags, it incorrectly indents the code forward. Even self-closing tags like <img> are not properly handled.

Temporary solution: Change <img src="..." /> to <img src="..."> (remove the trailing slash).

XiaoluoFoxington avatar Jun 10 '25 12:06 XiaoluoFoxington

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Acode, please let us know by commenting on this issue(i.e Bump!), and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 14 days. Thanks for your help!

github-actions[bot] avatar Aug 10 '25 03:08 github-actions[bot]

Screenshot_20250811_011504.jpg

Device Information: WebView Info: Package Name: com.google.android.webview Version: 138.0.7204.168

App Info: Name: Acode Package Name: com.foxdebug.acode Version: 1.11.5 Version Code: 963

Device Info: Android Version: 9 Manufacturer: vivo Model: V1809A Platform: Android Cordova Version: 13.0.0

Screen Info: Width: 540 Height: 1170 Color Depth: 24

Additional Info: Language: zh-CN User Agent: Mozilla/5.0 (Linux; Android 9; V1809A Build/PKQ1.181030.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.168 Mobile Safari/537.36

XiaoluoFoxington avatar Aug 10 '25 17:08 XiaoluoFoxington

Screenshot_20250811_011504.jpg

Device Information: WebView Info: Package Name: com.google.android.webview Version: 138.0.7204.168

App Info: Name: Acode Package Name: com.foxdebug.acode Version: 1.11.5 Version Code: 963

Device Info: Android Version: 9 Manufacturer: vivo Model: V1809A Platform: Android Cordova Version: 13.0.0

Screen Info: Width: 540 Height: 1170 Color Depth: 24

Additional Info: Language: zh-CN User Agent: Mozilla/5.0 (Linux; Android 9; V1809A Build/PKQ1.181030.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.168 Mobile Safari/537.36

Are you using default formatter ?

bajrangCoder avatar Aug 10 '25 17:08 bajrangCoder

Screenshot_20250811_011504.jpg

Device Information: WebView Info: Package Name: com.google.android.webview Version: 138.0.7204.168

App Info: Name: Acode Package Name: com.foxdebug.acode Version: 1.11.5 Version Code: 963

Device Info: Android Version: 9 Manufacturer: vivo Model: V1809A Platform: Android Cordova Version: 13.0.0

Screen Info: Width: 540 Height: 1170 Color Depth: 24

Additional Info: Language: zh-CN User Agent: Mozilla/5.0 (Linux; Android 9; V1809A Build/PKQ1.181030.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.168 Mobile Safari/537.36

Are you using default formatter ?

yes.

XiaoluoFoxington avatar Aug 10 '25 17:08 XiaoluoFoxington

Screenshot_20250811_011504.jpg Device Information: WebView Info: Package Name: com.google.android.webview Version: 138.0.7204.168 App Info: Name: Acode Package Name: com.foxdebug.acode Version: 1.11.5 Version Code: 963 Device Info: Android Version: 9 Manufacturer: vivo Model: V1809A Platform: Android Cordova Version: 13.0.0 Screen Info: Width: 540 Height: 1170 Color Depth: 24 Additional Info: Language: zh-CN User Agent: Mozilla/5.0 (Linux; Android 9; V1809A Build/PKQ1.181030.001; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/138.0.7204.168 Mobile Safari/537.36

Are you using default formatter ?

yes.

That's not for big/complex files, and also not reliable. Use Prettier or something else through plugin

bajrangCoder avatar Aug 10 '25 17:08 bajrangCoder

Hi there! 👋 We're working to clean up our issue tracker by closing older issues that might not be relevant anymore. If you are able to reproduce this issue in the latest version of Acode, please let us know by commenting on this issue(i.e Bump!), and we will keep it open. If you can't reproduce it, feel free to close the issue yourself. Otherwise, we'll close it in 14 days. Thanks for your help!

github-actions[bot] avatar Oct 10 '25 02:10 github-actions[bot]

This issue was closed because it has been inactive for 14 days since being marked as stale.

github-actions[bot] avatar Oct 25 '25 02:10 github-actions[bot]