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

image 格式化有问题 #61

Open
JerryCjr opened this issue Dec 5, 2019 · 4 comments
Open

image 格式化有问题 #61

JerryCjr opened this issue Dec 5, 2019 · 4 comments
Labels
bug Something isn't working enhancement improve developer experience

Comments

@JerryCjr
Copy link

JerryCjr commented Dec 5, 2019

prettyHtml format error: Void elements do not have end tags "image"
@JerryCjr
Copy link
Author

JerryCjr commented Dec 5, 2019

    "minapp-vscode.wxmlFormatter": "prettyHtml",
    "minapp-vscode.prettyHtml": {
        "useTabs": false,
        "tabWidth": 2,
        "printWidth": 100,
        "singleQuote": false,
        "usePrettier": true,
        "wrapAttributes": false,
        "sortAttributes": false
    }

@JerryCjr
Copy link
Author

JerryCjr commented Dec 5, 2019

wxml 内容

<view class='container'>
  <view class='test'>
    <image></image>
  </view>
</view>

@JerryCjr
Copy link
Author

JerryCjr commented Dec 5, 2019

如果用这个配置的话 又会莫名其妙在html后面加一个分号

    "minapp-vscode.wxmlFormatter": "prettier",
    "minapp-vscode.prettier": {
        "parser": "html"
    },

@iChenLei
Copy link
Member

最合理的还是针对wxml做一个prettier-wxml插件,prettyHtml和prettier都是针对标准HTML做处理的,wxml和标准HTML有不少差别

@iChenLei iChenLei added bug Something isn't working enhancement improve developer experience labels Aug 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement improve developer experience
Projects
None yet
Development

No branches or pull requests

2 participants