Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Rename the :script plugin to :javascript to conform more closely with…

… ruby haml. :script is still allowed however.
  • Loading branch information...
commit 53fad8e082689ea9498753a25d5e927e1dac9afb 1 parent f8231d7
@creationix authored
Showing with 4 additions and 4 deletions.
  1. +2 −2 README.markdown
  2. +1 −1  lib/haml.js
  3. +1 −1  test/script_css.haml
View
4 README.markdown
@@ -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);
}
View
2  lib/haml.js
@@ -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 ' +
View
2  test/script_css.haml
@@ -1,5 +1,5 @@
%head
- :script
+ :javascript
function greet(message) {
alert("Message from MCP: " + message);
}
Please sign in to comment.
Something went wrong with that request. Please try again.