# Quote Lines

> Adds > to the start of every line to quote the text in Markdown or email

Version: 1.0.0 · By Deck

- Install in Deck: deck://install-plugin?id=quote-lines&url=https%3A%2F%2Fgithub.com%2Fyuzeguitarist%2Fdeck-plugins%2Freleases%2Fdownload%2Fplugins%2Fquote-lines-1.0.0.zip
- Download .zip: https://github.com/yuzeguitarist/deck-plugins/releases/download/plugins/quote-lines-1.0.0.zip
- View on GitHub: https://github.com/yuzeguitarist/deck-plugins/tree/main/plugins/quote-lines

Or install with Terminal: 

```sh
mkdir -p ~/.deck/scripts/quote-lines && curl -fsSL https://github.com/yuzeguitarist/deck-plugins/releases/download/plugins/quote-lines-1.0.0.zip | tar -xf - -C ~/.deck/scripts/quote-lines
```

## Script

```js
// Puts "> " at the start of every line, as Markdown and plain-text email quote text. Empty lines get ">".
function transform(input) {
  const text = String(input ?? "").replace(/\r\n?/g, "\n");
  if (text === "") return "";
  const end = text.endsWith("\n") ? "\n" : "";
  const lines = (end ? text.slice(0, -1) : text).split("\n");
  return lines.map((line) => (line === "" ? ">" : "> " + line)).join("\n") + end;
}
```

---

- HTML: https://deckclip.app/plugins/quote-lines
- 中文: https://deckclip.app/zh-cn/plugins/quote-lines.md

© 2026 Yuze Pan
