Aptana Studio 3 - Warnings when using data-role Tags of HTML 5

后端 未结 6 635
悲&欢浪女
悲&欢浪女 2021-01-03 22:41

I want to use Aptana Studio 3 for developing jquery-mobile projects. Since jquery-mobile uses HTML5 I have to use tag attributes like \"data-role=\"header\" whi

相关标签:
6条回答
  • 2021-01-03 23:00

    The correct path to resolve the "unrecognized" issue for my build is: Window > Preferences > Aptana Studio > Validation > HTML Tidy Validator > Elements > Unrecognized elements > Ignore

    0 讨论(0)
  • 2021-01-03 23:01

    This had bugged me for months. I tried the solutions above but they didn't work. What did work for me was turning off HTML Tidy Validator in Aptana 3.2.2.

    Preferences -> Aptana Studio -> Validation -> HTML

    And then turn off HTML Tidy Validator for build and reconciliation.

    0 讨论(0)
  • 2021-01-03 23:04

    It more of a missing feature than a bug.

    In Preferences > Aptana Studio > Validation you can define regular expression that match to errors/warnings you want to be ignored.

    .*data-role.* should do it.

    0 讨论(0)
  • 2021-01-03 23:08

    Seems to it doesnt support for this, I went through Wikipedia and their doc. So we have to bear this until plug-in comes.

    0 讨论(0)
  • 2021-01-03 23:09

    I performed below and it resolved the problem.

    In Preferences > Aptana Studio > Validation > HTML Tidy Validator > Attributes >> Proprietary attributes --> ignore

    0 讨论(0)
  • 2021-01-03 23:16

    Late response but I found this thread while searching to resolve the same issue, tried the regex solution, which didn't work for me, so came up with this solution, which is at least less drastic than disabling HTML Tidy Validator:

    Window > Preferences > Aptana Studio > Validation > HTML Tidy Validator

    • Change Attributes > Proprietary Attributes from Warning to either Ignore or Info.

    There are several other frameworks other than jQuery Mobile (Angular for example) where the use of custom attributes is common, so I don't think this is a bad thing to do, as I don't know of any browser that breaks with custom attributes, they just get ignored.

    While you're changing HTML Tidy Validator, I'd also recommend removing the warning for elements with no content as often folks populate those through JavaScript. You can do so like this:

    • Change Elements > Trim Empty Elements from Warning to either Ignore or Info.
    0 讨论(0)
提交回复
热议问题