小编mik*_*eck的帖子

在此上下文中不允许元素样式作为元素主体的子元素(<style scoped> not validating)

<!DOCTYPE html>
...
<style scoped>
/* css */
</style>
Run Code Online (Sandbox Code Playgroud)

w3.org验证器给了我这个错误:

Line 883, Column 17: Element style not allowed as child of element body in this context.
(Suppressing further errors from this subtree.)
        <style scoped>...
Contexts in which element style may be used:
If the scoped attribute is absent: where metadata content is expected.
If the scoped attribute is absent: in a noscript element that is a child of a head element.
If the scoped attribute is present: where flow content …
Run Code Online (Sandbox Code Playgroud)

html css w3c-validation

13
推荐指数
1
解决办法
2万
查看次数

获取Sublime Text 3插件中的当前行

我正在为Sublime Text 3编写一个简单的插件,需要获取当前所选行的内容.我可以用

selection = sublime.Region(self.view.sel()[0].begin(), self.view.sel()[0].end())
Run Code Online (Sandbox Code Playgroud)

获取当前突出显示的部分,但是有没有办法选择或返回整个当前行的内容而无需手动选择所有内容?

这个页面上的"重复"示例做了我想要的,但似乎在ST3中被打破了.当我运行它时,我得到了错误TypeError: run() missing 1 required positional argument: 'args'.

python sublimetext sublimetext3 sublime-text-plugin

4
推荐指数
1
解决办法
1580
查看次数