Git Product home page Git Product logo

cl-closure-template's People

Contributors

ababo avatar andy128k avatar archimag avatar bagulin avatar binarin avatar eviltosha avatar linkfly avatar mishoo avatar orivej avatar red-cheese avatar ruricolist avatar sectoid avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cl-closure-template's Issues

Предложение. Атрибут для сохранения форматирования

Очень нужен атрибут позволяющий сохранять форматирование в шаблонах. Например, для того, чтобы не повторять всё время команду {\n}.
Параметр можно назвать как-нибудь вроде saveFormating и применять при определении шаблонов:

{template mytemplate saveFormating="true"}
...
{/template}

Document differences from google closure templates

It would be nice to have documentation of any differences from Google's implementation.

For example, auto-escaping seems to work very differently than Google's implementation, but there is no documentation of how it works in class-closure-template.

Incomplete parse error on simple template

A very simple file...

{namespace spa.history}

{template show}
  <tr>
    <td>{$type}</td>
    <td>{$date|date}</td>
    <td class="comment"><div>{$comment}</div></td>
    <td>{$author}</td>
    <td><a href="/history/{$id}/edit">modifier</a></td>
  </tr>
{/template}

I try to compile it:

CL-USER> (closure-template:compile-cl-templates #P"/path/to/file.tmpl")

I get this error:

Incomplete parse.

  Encountered at:
    namespace spa.history}

{template show}
  <tr>

     ^ (Line 3, Column 1, Position 25)
   [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]

Have I missed anything obvious?

Не работает оператор ifempty в команде foreach.

Делаю так:
//Шаблон:
{template experiment2}
{foreach $loc in $array}
loc.val is a {$loc.val} index = {index($loc)}{\n}
{ifempty}
some
{/foreach}
{/template}

Вызов:
(examples.simple:experiment2
'(:array ((:val 1) (:val 2) (:val 3)))
)

Вывод:
"loc.val is a 1 index = 0
loc.val is a 2 index = 1
loc.val is a 3 index = 2
"

cl-closure-template из последнего quicklisp'a: cl-closure-template-20131003-git
OS: Ubuntu 12.04.3 LTS
Lisp: sbcl 1.1.0

"let" not implemented ??

When using

{let $var: 1 /}

the following error occurs:

Incomplete parse.    Encountered at:     osure-template.Example} {template test} <ht      ^ (Line 3, Column 1, Position 38)     [Condition of type ESRAP::SIMPLE-ESRAP-ERROR]

full-call doesn't work

The template file:

{namespace ns}

{template callee}
{/template}


{template caller}
{call callee} {/call}
{/template}

Being runned with the following code:

(require 'asdf)
(asdf:operate 'asdf:load-op '#:closure-template)
(print (closure-template:compile-template :javascript-backend (make-pathname :name "./test.tmpl")))

Produces:

$ sbcl --load test.lisp
This is SBCL 1.0.54, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.

SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
style-warning: Implicitly creating new generic function ps-print.

debugger invoked on a SIMPLE-ERROR in thread

<THREAD "initial thread" RUNNING {AB00921}>:

Incomplete parse, stopped at 50.

Type HELP for debugger help, or (SB-EXT:QUIT) to exit from SBCL.

restarts (invokable by number or by possibly-abbreviated name):
0: [RETRY ] Retry EVAL of current toplevel form.
1: [CONTINUE] Ignore error and continue loading file "/home/necto/proj/genealogy/test.lisp".
2: [ABORT ] Abort loading file "/home/necto/proj/genealogy/test.lisp".
3: Ignore runtime option --load "test.lisp".
4: Skip rest of --eval and --load options.
5: Skip to toplevel READ/EVAL/PRINT loop.
6: [QUIT ] Quit SBCL (calling #'QUIT, killing the process).

(ESRAP::PROCESS-PARSE-RESULT
#S(ESRAP::RESULT
:%PRODUCTION ((CLOSURE-TEMPLATE.PARSER:NAMESPACE "gaga"
(CLOSURE-TEMPLATE.PARSER:TEMPLATE ("callee"))))
:POSITION 50)
"{namespace gaga}

{template callee}
{/template}

{template caller}
{call callee} {/call}
{/template}
"
102
NIL)
0]

But I've expected a call. If I've misunderstood a syntax in documentation, how should I call a subtemplate with custom parameters?

Необходимо распознавать является элемент текстом или списком

Например проходя по списку опций, я бы хотел в случае если используются дополнительные настройки элемента - представлять его списком, концептуально использование я вижу так:
{foreach $option in $options}
{if isList($option)}

{$optioin.text} {else} {$option} {/if} {/foreach}

injected data

Hi,

I could not find a way to insert injected data. Has it been implemented?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.