Skip to content

Commit 049941c

Browse files
committed
use some shiki options
1 parent 863d35c commit 049941c

File tree

2 files changed

+24
-36
lines changed

2 files changed

+24
-36
lines changed

.vuepress/config.js

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,16 @@ export default defineUserConfig({
9090
},
9191
},
9292
head: [
93-
["link", { rel: "preload", href: "/fonts/FiraCode-Regular.woff2", as: "font", type: "font/woff2", crossorigin: "anonymous" }],
93+
[
94+
'link',
95+
{
96+
rel: 'preload',
97+
href: '/fonts/FiraCode-Regular.woff2',
98+
as: 'font',
99+
type: 'font/woff2',
100+
crossorigin: 'anonymous',
101+
},
102+
],
94103
['meta', { name: 'theme-color', content: '#3eaf7c' }],
95104
['meta', { name: 'apple-mobile-web-app-capable', content: 'yes' }],
96105
[
@@ -199,6 +208,7 @@ export default defineUserConfig({
199208
onedarkpro: 'one-dark-pro', // pre-load one-dark-pro for ansi code blocks
200209
},
201210
lineNumbers: 10,
211+
collapsedLines: false,
202212
transformers: [
203213
// use one-dark-pro theme for ansi code blocks
204214
{

blog/2025-09-02-nushell_0_107_0.md

Lines changed: 13 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -65,18 +65,14 @@ alias find = find -i
6565

6666
Previously, `find` would always split multi-line input strings, making it impossible to perform proper multi-line regex matches unless a string was within list, table, or record. Now, the `--multiline` flag can be used to prevent this splitting, replacing its previous behavior of prepending `(?m)` to the regex.
6767

68-
Before:
69-
70-
```ansi
68+
```ansi:title="Before"
7169
> "hello\nworld" | find -mr 'lo\swo'
7270
╭────────────╮
7371
│ empty list │
7472
╰────────────╯
7573
```
7674

77-
After:
78-
79-
```ansi
75+
```ansi:title="After"
8076
> "hello\nworld" | find -mr 'lo\swo'
8177
hello
8278
worl
@@ -232,11 +228,8 @@ With the new [watch --debounce option](#new-watch-duration-option-toc), the `--d
232228

233229
`nu --testbin` has a new flag `-h` to show available \<bins\>
234230

235-
<details>
236-
<p>
237-
238-
```
239-
> nu --testbin -h
231+
```ansi:collapsed-lines=4
232+
> nu --testbin -h
240233
Usage: nu --testbin <bin>
241234
<bin>:
242235
chop -> With no parameters, will chop a character off the end of each line
@@ -251,15 +244,12 @@ input_bytes_length -> Prints the number of bytes received on stdin(e.g: 0x[deadb
251244
meow -> Cross platform cat (open a file, print the contents) using read_to_string and println!()(e.g: nu --testbin meow file.txt)
252245
meowb -> Cross platform cat (open a file, print the contents) using read() and write_all() / binary(e.g: nu --testbin meowb sample.db)
253246
nonu -> Cross platform echo but concats arguments without space and NO newline(e.g: nu --testbin nonu a b c)
254-
nu_repl -> Run a REPL with the given source lines
247+
nu_repl -> Run a REPL with the given source lines, it must be called with `--testbin=nu_repl`, `--testbin nu_repl` will not work due to argument count logic
255248
relay -> Relays anything received on stdin to stdout(e.g: 0x[beef] | nu --testbin relay)
256249
repeat_bytes -> A version of repeater that can output binary data, even null bytes(e.g: nu --testbin repeat_bytes 003d9fbf 10)
257-
repeater -> Repeat a string or char N times(e.g: nu --testbin repeater a 5)
250+
repeater -> Repeat a string or char N times(e.g: nu --testbin repeater a 5)[0m
258251
```
259252

260-
</p>
261-
</details>
262-
263253
### New keybinding: `vichangemode`
264254

265255
You can now set bindings which change the Vi mode.
@@ -284,7 +274,7 @@ The `stor create/insert/open` and `query db` commands now support JSON and JSONB
284274

285275
Here's an example of storing a simple table inside a `stor` database, and retrieving it as structured data with `query db`:
286276

287-
```ansi
277+
```ansi:no-line-numbers
288278
# create a table named my_table with a JSON column named data
289279
> stor create -t my_table -c {data: json}
290280
╭──────────┬────────────────╮
@@ -448,9 +438,7 @@ This may break edge cases which relied on a lack of a `urls` column, for example
448438

449439
Before, `http post` would serialize values as raw JSON. Now, the JSON will be serialized into the pretty format. Note that this increases the body size.
450440

451-
Before:
452-
453-
```http
441+
```http:title="Before"
454442
POST / HTTP/1.1
455443
Host: localhost:1234
456444
User-Agent: nushell
@@ -462,9 +450,7 @@ Content-Length: 13
462450
{"foo":"bar"}
463451
```
464452

465-
After:
466-
467-
```http
453+
```http:title="After"
468454
POST / HTTP/1.1
469455
accept-encoding: gzip
470456
content-length: 18
@@ -602,19 +588,15 @@ $env.config.table = {mode: light, padding: {left: 1}, header_on_separator: false
602588

603589
:::
604590

605-
Before:
606-
607-
```
591+
```txt:title="Before"
608592
Find and replace all occurrences of found string in record using regular expression
609593
> { KeyA: abc, KeyB: abc, KeyC: ads } | str replace --all --regex 'b' 'z' KeyA KeyC
610594
KeyA azc
611595
KeyB abc
612596
KeyC ads
613597
```
614598

615-
After:
616-
617-
```
599+
```txt:title="After"
618600
Find and replace all occurrences of found string in record using regular expression
619601
> { KeyA: abc, KeyB: abc, KeyC: ads } | str replace --all --regex 'b' 'z' KeyA KeyC
620602
KeyA azc
@@ -626,9 +608,7 @@ After:
626608

627609
Aliases to external commands will now be properly highlighted as external commands.
628610

629-
Behavior _before_ this PR:
630-
631-
```ansi
611+
```ansi:title="Behavior in 0.106.1"
632612
> $env.config.highlight_resolved_externals = true
633613
> $env.config.color_config = { shape_external: red_bold, shape_external_resolved: yellow_bold, shape_internalcall: blue_bold }
634614
> alias internal-alias = echo
@@ -639,9 +619,7 @@ Behavior _before_ this PR:
639619
internal-alias; external-alias; unresolvable-alias; bash;
640620
```
641621

642-
Behavior _after_ this PR:
643-
644-
```ansi
622+
```ansi:title="Behavior in 0.107.0"
645623
> $env.config.highlight_resolved_externals = true
646624
> $env.config.color_config = { shape_external: red_bold, shape_external_resolved: yellow_bold, shape_internalcall: blue_bold }
647625
> alias internal-alias = echo

0 commit comments

Comments
 (0)