tea/modules/print
Norwin bbb287e29e markdown: dont emit ansi sequences when not emitting to tty (#491)
Allows generating a plain text version of an issue (i.e. without colors and other terminal formatting) when storing stdout in a file.
```
tea issue --comments 1 > issue1.txt
```

`IsInteractive()` had to be moved to avoid a recursive import chain.

---

In the future, it would be nice to also respect the `--output` flag. This flag is currently designed for tabular output, but we could add more supported values like `markdown` `ansi`, `plain` to it

Co-authored-by: Norwin <git@nroo.de>
Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://gitea.com/gitea/tea/pulls/491
Reviewed-by: 6543 <6543@obermui.de>
Reviewed-by: delvh <dev.lh@web.de>
2022-09-14 02:35:15 +08:00
..
comment.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
formatters.go markdown: dont emit ansi sequences when not emitting to tty (#491) 2022-09-14 02:35:15 +08:00
issue.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
label.go Add `tea issues --fields`, allow printing labels (#312) 2020-12-21 23:41:07 +08:00
login.go Detect markdown line width, resolve relative URLs (#332) 2021-03-12 20:28:46 +08:00
markdown.go markdown: dont emit ansi sequences when not emitting to tty (#491) 2022-09-14 02:35:15 +08:00
milestone.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
notification.go Implement notification subcommands (#389) 2021-09-06 01:11:17 +08:00
organization.go Add `tea org create <name>` (#420) 2021-09-29 04:32:16 +08:00
pull.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
release.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
repo.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
table.go Add TSV to machine-readable formats (#467) 2022-03-13 12:00:21 +08:00
times.go Return RFC3339 UTC timestamps for machine-readable output (#470) 2022-03-29 06:37:13 +08:00
user.go Add `tea whoami` command (#426) 2021-10-05 01:41:59 +08:00