posthtml-expressions icon indicating copy to clipboard operation
posthtml-expressions copied to clipboard

Use variables, JS-like expressions, and even markup-powered logic in your HTML.

Results 24 posthtml-expressions issues
Sort by recently updated
recently updated
newest added

Currently it is possible to use variables as values of existing attributes, but there is no ability to add new attributes. What if we check [here](https://github.com/posthtml/posthtml-expressions/blob/master/lib/index.js#L154) for variables defined as...

Docs says: > You can inject locals into any piece of content in your html templates, _other than overwriting tag names_ Is it fundamentally impossible or just not implemented currently?

Removes [got](https://github.com/sindresorhus/got). It's no longer used after updating ancestor dependency [ava](https://github.com/avajs/ava). These dependencies need to be updated together. Removes `got` Updates `ava` from 3.15.0 to 4.3.3 Release notes Sourced from...

dependencies

It seem that it's not possible to set attributes via locals, but only values. So it's not possible to set dynamically the "selected" or "disabled" attribute to a select or...

@Scrum I'd like to work on a new major release for posthtml-expressions that would include: - refactoring code to ESM-only - require Node.js 18+ - migrate tests to use Vitest...

## Proposed Changes This PR adds `require()` to the vm context when executing code from ``. ## Types of Changes - [ ] Bug (non-breaking change which fixes an issue)...

index.html ` { "attributes": "header-fixed", } ` header.html `` i checked out [here](https://github.com/posthtml/posthtml-expressions#locals) i could do it via locals, can i do it using this way?

Consider the code: ```xml Foo Bar ``` It should display `Foo`, but instead it displays `Foo Bar`. When HTML comment is removed it works as expected. Originally reported in maizzle/framework#982...

Some of my variables come from user input. The user should be free to type any character, including the delimiters. But if they type expressions like `"{{2*3}}"`, this can lead...

I tried to remove the script Locals, but that doesn't work: `module.exports = { root: "src/views", input: "**/*.html", output: "public", allInOutput: true, plugins: { "posthtml-expressions": { locals: { env :...