# textmate-bailout

> This is a very specific tool that is used when you have a TextMate grammar that wants to include/contain another Textmate grammar. For example a Markdown grammar wanting to include a C++ grammar.

Latest version **1.1.0** (published 2019-08-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install textmate-bailout
pnpm add textmate-bailout
yarn add textmate-bailout
bun add textmate-bailout
```

## 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-08-25 |
| First published | 2019-08-25 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Maintainers | jeff.hykin |

## Links

- npm: https://www.npmjs.com/package/textmate-bailout
- Repository: https://github.com/jeff-hykin/textmate_bailout
- Homepage: https://github.com/jeff-hykin/textmate_bailout#readme
- Issues: https://github.com/jeff-hykin/textmate_bailout/issues
- npm.io page: https://npm.io/package/textmate-bailout

## Dependencies (2)

- [lodash](https://npm.io/package/lodash.md) ^4.17.15
- [sync-request](https://npm.io/package/sync-request.md) ^6.1.0

## Recent versions

- 1.1.0 (latest) — 2019-08-25
- 1.0.0 — 2019-08-25

## README

### What is this?

This is a very specific tool that is used when you have a TextMate grammar that wants to include/contain another Textmate grammar. For example a Markdown grammar wanting to include a C++ grammar.

### How do I use it?

Here's an example of two differen LaTeX including an embedded C++ file:
```javascript
let duplicateForEmbedding = require("textmate-bailout")

// 1.from a url (will download the source every time)
duplicateForEmbedding({ 
    url: 'https://raw.githubusercontent.com/jeff-hykin/cpp-textmate-grammar/master/syntaxes/cpp.tmLanguage.json', 
    appendScope: "latex",
    bailoutPattern: "\\\\end\\{minted\\}",
    newFileLocation: "cpp-latex.tmLanguage.json"
})
// 2.from a local file
duplicateForEmbedding({
    grammarFilePath: "./someGrammer.tmLanguage.json",
    appendScope: "latex",
    bailoutPattern: "\\\\end\\{minted\\}",
    newFileLocation: "cpp-latex.tmLanguage.json"
})
```

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