# @modix/smarty-tmlanguage

> TextMate grammar files for Smarty 3 for VS Code, Sublime Text, and Atom

Latest version **1.1.0** (published 2019-12-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @modix/smarty-tmlanguage
pnpm add @modix/smarty-tmlanguage
yarn add @modix/smarty-tmlanguage
bun add @modix/smarty-tmlanguage
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2019-12-19 |
| First published | 2019-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 75.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Modix GmbH |
| Maintainers | jens-duttke, meatgear, modix-user, mx-hq-product |

## Links

- npm: https://www.npmjs.com/package/@modix/smarty-tmlanguage
- Repository: https://github.com/Modix/smarty-tmlanguage
- Homepage: https://github.com/Modix/smarty-tmlanguage#readme
- Issues: https://github.com/Modix/smarty-tmlanguage/issues
- npm.io page: https://npm.io/package/@modix/smarty-tmlanguage

## Recent versions

- 1.1.0 (latest) — 2019-12-19
- 1.0.1 — 2019-12-16
- 1.0.0 — 2019-12-16

## README

# smarty-tmlanguage

This repository contains TmLanguage files that can be consumed by [Smarty 3](https://www.smarty.net/docs/en/) editors and plugins such as [Visual Studio Code](https://github.com/Microsoft/vscode), [Sublime Text](https://www.sublimetext.com), [Atom](https://atom.io), and possibly others.

Latest version of the grammar can be also found as a [VSCode extension](https://marketplace.visualstudio.com/items?itemName=Modix.mx-smarty).

<img src="https://cdn.jsdelivr.net/gh/Modix/smarty-tmlanguage/screenshot.png" width="100%" />

## Installation
``` sh
npm install @modix/smarty-tmlanguage --save
```

## Known restrictions

Currently, the following features of Smarty 3 are not implemented:

- Ternary operator (`{$a ? $b : $c}`)
- Line-breaks within modifiers
- `nocache` pseudo attribute (`{$var nocache}`)
- Method calls with parentheses (`$smarty->clearAllCache()`)
- Object property accesstor `->`
- Object method chaining (`{$object->method1($x)->method2($y)}`)
- Opening and closing `{strip}` everywhere

The rules have a high understanding of the structure of the document, or with other words, they are very restrictive. This means, if you close a block (e.g. `{/if}`) without to open it, the highlighter will show that with wrong colorization, because in the case of the `{/if}`, it assumes that you try to divide nothing by the unquoted string "if", since this operation has higher priority than an unallowed `{/if}` statement.

The same counts if you open an `{if}` in a HTML comment, but close it outside, or if a HTML tag is not closed correctly (e.g. `{if $link !== ''}<a href="...">My Link</a{/if}`).

---
_Source: https://npm.io/package/@modix/smarty-tmlanguage · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
