| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The with-html-output ("WHO") macro defines some local macrolets.
Those are in scope of the entire thing, but they can only be
meaningfully used in the imperative Lisp forms that are placed
into the HTML tag body. If they are used in an attribute
expression, it's probably a programming error; an output
side effect doesn't belong there. We implement a diagnostic
strategy which produces a warning in this situation.
* who.tl (attr-warning-macrolet): New function, which
wraps macrolet code around the expression passed in.
These macrolets intercept the local macros and generate
a warning. Then they decline to expand, deferring to the
real macros.
(convert-attributes): Wrap the warning macrolets around
the run-time evaluation of the val expression. We don't
do anything for the compile-time evaluation of a constant
attribute expression, because the macro calls we want
to intercept do not appear in a constant expression.
* test/simple.tl: New test 41 validating that warnings
are generated for all the local macros when they are called
from an attr expression.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* packages.tl (tl-who): Add noesc-fmt symbol.
* who.tl (with-html-output): Add escaping to fmt,
which is disabled under *cl-who-compat*.
Add noesc-fmt macro that looks like former definition
of fmt.
* test/simple.tl: New test cases 38-40.
* README.md: Mention that TL-WHO provides noesc-fmt.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CL-WHO tries to handle the case when attribute values are
constant NIL and T values, but it bungles it; it applies
the correct behavior only when the constants are literally
these symbols, not when they are constant expressions
which evaluate to these values.
Secondly, CL-WHO neglects to HTML-escape attribute values.
We fix this behavior and introduce a noesc operator to
selectively revert it, as well as a *cl-who-compat* special
to revert the behavior more pervasively, for the daredevils.
* packages.tl (tl-who): New symbols *cl-who-compat* and noesc.
* specials.tl (*cl-who-compat*): New special variable.
* who.tl (convert-attributes): When treating a constant
expression, evaluate it first, then check for nil or t.
Escape interpolated text with html-encode.
Check the original expression for (noesc ...) pattern,
or the presence of *cl-who-compat*. In these cases, don't
generate the escape call.
* test/simple.tl: New tests 28 to 37 providing some coverage
to all these changes.
* README.md: Document.
|
|
|
|
|
|
|
| |
* simple.tl: Translate and enable all tests.
* who.tl (process-tag): Fix double nreverse bug
causing attr list to be truncated to one tag.
|
| |
|
|
|
|
| |
* test/simple.tl: Port tests 7 through 8 and move (exit).
|
|
|
|
|
|
|
|
|
|
|
| |
* who.tl (convert-attributes): In the run-time case,
we must generate code to print the calculated
string, not just to calculate it.
(convert-tag-to-string-list): Test the original tag
keyword against the *html-empty-tags*, not the
transformed string.
* test/simple.tl: Port and enable tests 1 to 7.
|
|
|
|
|
|
|
| |
* test/simple: renamed to simple.tl. Just a self-contained
file we can run. The first test has been rewritten to TL.
After that we (exit). The first test is failing; it is
not rendering any attributes.
|
|
|
|
|
| |
* Fix keyword bloating in DEFPACKAGE :EXPORT clauses
* Fix keyword bloating in DEFPACKAGE :SHADOW clause
|
|
|
|
|
|
|
|
| |
Tags in this list don't have their body indented even if
*INDENT* is true.
<pre> in particular is indentation sensitive, and it's irritating
when rendering changes as :indent is flipped.
|
|
|
|
|
|
|
| |
Previously the tests implicitly assumed that EVAL does macroexpansion
at runtime -- which is legal, but not required.
Add explicit EVAL calls to tests requiring that.
|
|
|
|
| |
A bit ugly, but...
|
|
|
|
|
| |
Just spent 20 minutes trying to figure out why a test that
wasn't failing was...
|
| |
|
|
git-svn-id: svn://bknr.net/svn/trunk/thirdparty/cl-who@4336 4281704c-cde7-0310-8518-8e2dc76b1ff0
|