Skip to content

Commit

Permalink
Allow uppercase letters in ID attribute even though it's invalid. [#1…
Browse files Browse the repository at this point in the history
…81 state:resolved]
  • Loading branch information
jgarber committed Mar 1, 2010
1 parent 1d79ba5 commit 26c16ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth_common.rl
Expand Up @@ -17,7 +17,7 @@

# textile element attributes
class = [a-z0-9\- _]+ ;
id = [a-z0-9\-_]+ ;
id = [A-Za-z0-9\-_]+ ;
style_chars = [a-z0-9: ;\-_#&.%];
style_url = "url(" [a-z0-9'".\\/#?=+@_\-]+ ")";
style = style_chars (style_chars+ | style_url)* ; # maybe put in uri when in url()
Expand Down
5 changes: 5 additions & 0 deletions spec/fixtures/basic.yml
Expand Up @@ -367,6 +367,11 @@ name: css id
desc: An element ID can be given by prefixing the ID with a pound symbol and using it in place of the class.
in: p(#big-red). Red here
html: <p id="big-red">Red here</p>
---
name: css id with initial uppercase
desc: CSS IDs are supposed to be lowercase, but Textile understands the invalid capitalization nonetheless
in: p(#Foo). bar
html: <p id="Foo">bar</p>
---
name: class and id combined
desc: Class and ID can be combined by placing the class first.
Expand Down

0 comments on commit 26c16ff

Please sign in to comment.