[SOLVED] JADE anyone have a clue?

[SOLVED] JADE anyone have a clue?
0.0 0

#1
extends layout

block content
  h1= title
  p The API is called by using #[a(href='/api/') https://img-abstraction-layer-jb-ps-bizzel.c9users.io/api/]
  
  p then adding a search term 

This is invalid apparently. I have no clue and can’t find any documentation.
An obvious choice for the default view engine :confused:

The error is The end of the string was reached with no closing bracket found.


#2

Looks like you forgot the closing bracket for the link element:
#[a(href='/api/')]


#3

So where does the link name text go?


#4

This is the syntax I found:

a(href="#book-a") Book A

which would yield:

<a href="#book-a">Book A</a>

Hopefully it works? From: https://naltatis.github.io/jade-syntax-docs/


#5

The syntax looks right. Are you sure the problem isn’t in the layout file?


#6

Try adding a space between the final slash and the ending square bracket. If they’re too close, the precompiler may be interpreting this as an escape sequence.

#[a(href='/api/') https://img-abstraction-layer-jb-ps-bizzel.c9users.io/api/ ] // <-- extra space at the end

Also, Jade was renamed to Pug some time ago, so you’ll find more recent documentation at their new site.


#7

Looks like the issue was the second link as the link name. I changed it to

#[a(href='https://github.com/JohnnyBizzel/img-abstraction-layer-jb-ps') GitHub Readme file]
Extra space is not important. :smiley: