Upped the level of #'s

This commit is contained in:
Wouter Scherphof 2013-03-28 12:44:43 +01:00
parent 17676b9b7c
commit 16fd925625

View File

@ -2,10 +2,10 @@
Parse HTML text into a tree of elements with selectors Parse HTML text into a tree of elements with selectors
###License ##License
MIT; see ./doc/LICENSE MIT; see ./doc/LICENSE
###Usage ##Usage
Start off with Start off with
```lua ```lua
require("luarocks.loader") require("luarocks.loader")
@ -35,7 +35,7 @@ for e in pairs(elements) do
end end
``` ```
###Selectors ##Selectors
- `"element"` - `"element"`
- `"#id"` - `"#id"`
- `".class"` - `".class"`
@ -53,11 +53,11 @@ end
Selectors can be combined; e.g. `".class:not([attribute]) element.class"` Selectors can be combined; e.g. `".class:not([attribute]) element.class"`
####Limitations ###Limitations
- Attribute values in selectors currently cannot contain any spaces, since space is interpreted as a delimiter between `ancestor` and `descendant`, `parent` and `>`, or `>` and `child` parts of the selector - Attribute values in selectors currently cannot contain any spaces, since space is interpreted as a delimiter between the `ancestor` and `descendant`, `parent` and `>`, or `>` and `child` parts of the selector
- Likewise, for the `parent > child` relation, the spaces before and after the `>` are mandatory - Likewise, for the `parent > child` relation, the spaces before and after the `>` are mandatory
###Element type ##Element type
All tree elements provide, apart from `:select` and `()`, the following accessors: All tree elements provide, apart from `:select` and `()`, the following accessors:
- `.name` = the element's tagname - `.name` = the element's tagname
- `.attributes` = a table with keys and values for the element's attributes; `{}` if none - `.attributes` = a table with keys and values for the element's attributes; `{}` if none