sintaxi / harp

Static Web Server/Generator/Bundler
http://harpjs.com
5k stars 343 forks source link

Unable to add Excerpt using Jade #541

Closed amandeepmittal closed 8 years ago

amandeepmittal commented 8 years ago

//- excerpt

shows syntax error for '-' (hyphen) and if I remove hyphen shows syntax error for '}' end curly brace.

chharvey commented 8 years ago

did you mean this?

//- excerpt
- function excerpt(content) return content.split("<!-- more -->")[0]; -}

If so, I see 2 syntax errors:

  1. no opening curly brace before the word return
  2. extraneous hyphen immediately before the closing curly brace
amandeepmittal commented 8 years ago

I certainly did. However, it does not looks as confusing as your emoji sounds. Also, the issue was solved by myself months back so I am closing it now. The curly brace was missing before return.