Skip to content

Commit

Permalink
Rename the :script plugin to :javascript to conform more closely with…
Browse files Browse the repository at this point in the history
… ruby haml. :script is still allowed however.
  • Loading branch information
creationix committed Jan 10, 2010
1 parent f8231d7 commit 53fad8e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.markdown
Expand Up @@ -127,12 +127,12 @@ You can loop over the keys and values of objects too (Note the inner `:each` loo
%dt&= name
%dd&= value

### `:css` and `:script` helpers.
### `:css` and `:javascript` helpers.

It's easy to embed javascript and css blocks in an haml document.

%head
:script
:javascript
function greet(message) {
alert("Message from MCP: " + message);
}
Expand Down
2 changes: 1 addition & 1 deletion lib/haml.js
Expand Up @@ -279,7 +279,7 @@ if (exports) {

// script blocks
{
regexp: /^(\s*):script\s*$/,
regexp: /^(\s*):(?:java)?script\s*$/,
process: function () {
return JSON.stringify('\n<script type="text/javascript">\n' +
'//<![CDATA[\n ' +
Expand Down
2 changes: 1 addition & 1 deletion test/script_css.haml
@@ -1,5 +1,5 @@
%head
:script
:javascript
function greet(message) {
alert("Message from MCP: " + message);
}
Expand Down

0 comments on commit 53fad8e

Please sign in to comment.