Skip to content

Commit

Permalink
0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
8LWXpg committed Oct 21, 2023
1 parent a7bb074 commit a48ff45
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 20 deletions.
13 changes: 12 additions & 1 deletion .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"version": "2.0.0",
"tasks": [
{
"label": "watch",
"label": "watch demo",
"type": "shell",
"command": "typst",
"args": [
Expand All @@ -18,6 +18,17 @@
"isDefault": true
}
},
{
"label": "watch test",
"type": "shell",
"command": "typst",
"args": [
"w",
"test/test.typ",
"--root",
"${workspaceFolder}"
],
},
{
"label": "compile themes",
"type": "shell",
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog 📝

## [0.5.1] - 2023-10-21

### Fixed

* Fixed height with empty newline

## [0.5.0] - 2023-09-29

### Added
Expand Down
1 change: 0 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Thank you for your interest in contributing to this project! This document outli
2. Add your theme to the `terminal-themes` directory.
3. Add theme preview to the `test/themes.typ` file.
4. Make sure you have `Cascadia Code` font installed and compile the `test/themes.typ` file (you can use `compile themes` task in VS Code).
5. Make sure you're not committing `ansi-render.pdf` file.

## Code formatting

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ contribution is welcomed!
above: relative length or fraction,
below: relative length or fraction,
clip: boolean,
theme: terminal-themes.theme,
bold-is-bright: boolean,
theme: terminal-themes.theme,
)
```

Expand All @@ -46,8 +46,8 @@ contribution is welcomed!
- `string` - string with ANSI escape sequences
- `font` - font name or none, default is `Cascadia Code`, set to `none` to use the same font as `raw`
- `size` - font size, default is `1em`
- `theme` - theme, default is `vscode-light`
- `bold-is-bright` - boolean, whether bold text is rendered with bright colors, default is `false`
- `theme` - theme, default is `vscode-light`
- parameters from [`block`](https://typst.app/docs/reference/layout/block/) function with the same default value, only affects outmost block layout:
- `width`
- `height`
Expand Down
Binary file modified test/demo.pdf
Binary file not shown.
15 changes: 0 additions & 15 deletions test/demo.typ
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,3 @@
ansi-render(bold-bright-test, theme: terminal-themes.vintage),
ansi-render(bold-bright-test, theme: terminal-themes.vintage, bold-is-bright: true),
)

= Render empty newlines
#ansi-render(
"


3 empty lines above



3 empty lines below


"
)
Binary file added test/test.pdf
Binary file not shown.
19 changes: 19 additions & 0 deletions test/test.typ
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#import "../ansi-render.typ": ansi-render as __ansi-render, terminal-themes

// workaround before set is implemented
#let ansi-render = __ansi-render.with(inset: 5pt, radius: 3pt, theme: terminal-themes.vscode)

// newline with background color
#ansi-render(
"\u{1b}[101mHello


World")

// Render empty newlines
#grid(
columns: (auto, auto),
column-gutter: 1pt,
ansi-render("\n\n\n\n\n"),
ansi-render("1\n2\n3\n4\n5\n6"),
)
2 changes: 1 addition & 1 deletion typst.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ansi-render"
version = "0.5.0"
version = "0.5.1"
entrypoint = "ansi-render.typ"
authors = ["8LWXpg"]
license = "MIT"
Expand Down

0 comments on commit a48ff45

Please sign in to comment.