Skip to content

Commit 3278f45

Browse files
authored
docs: correctly escape backticks (#10216)
1 parent 67db04c commit 3278f45

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

docs/admin/hooks.mdx

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -359,23 +359,23 @@ The `useForm` hook returns an object with the following properties:
359359
rows={[
360360
[
361361
{
362-
value: "**\`path\`**",
362+
value: "**\\\`path\\\`**",
363363
},
364364
{
365365
value: "The path to the array or block field",
366366
},
367367
],
368368
[
369369
{
370-
value: "**\`rowIndex\`**",
370+
value: "**\\\`rowIndex\\\`**",
371371
},
372372
{
373373
value: "The index of the row to add. If omitted, the row will be added to the end of the array.",
374374
},
375375
],
376376
[
377377
{
378-
value: "**\`data<\`**",
378+
value: "**\\\`data<\\\`**",
379379
},
380380
{
381381
value: "The data to add to the row",
@@ -385,8 +385,8 @@ The `useForm` hook returns an object with the following properties:
385385
/>
386386
387387
388-
\`\`\`tsx
389-
{\`import { useForm } from "payload/components/forms";
388+
\\\`\\\`\\\`tsx
389+
{\\\`import { useForm } from "payload/components/forms";
390390
391391
export const CustomArrayManager = () => {
392392
const { addFieldRow } = useForm()
@@ -409,13 +409,13 @@ export const CustomArrayManager = () => {
409409
Add Row
410410
</button>
411411
)
412-
}\`}
413-
\`\`\`
412+
}\\\`}
413+
\\\`\\\`\\\`
414414
415415
An example config to go along with the Custom Component
416416
417-
\`\`\`tsx
418-
{\`const ExampleCollection = {
417+
\\\`\\\`\\\`tsx
418+
{\\\`const ExampleCollection = {
419419
slug: "example-collection",
420420
fields: [
421421
{
@@ -438,8 +438,8 @@ An example config to go along with the Custom Component
438438
},
439439
},
440440
],
441-
}\`}
442-
\`\`\`
441+
}\\\`}
442+
\\\`\\\`\\\`
443443
`
444444
}
445445
],
@@ -463,15 +463,15 @@ An example config to go along with the Custom Component
463463
rows={[
464464
[
465465
{
466-
value: "**\`path\`**",
466+
value: "**\\\`path\\\`**",
467467
},
468468
{
469469
value: "The path to the array or block field",
470470
},
471471
],
472472
[
473473
{
474-
value: "**\`rowIndex\`**",
474+
value: "**\\\`rowIndex\\\`**",
475475
},
476476
{
477477
value: "The index of the row to remove",
@@ -482,8 +482,8 @@ An example config to go along with the Custom Component
482482
483483
484484
485-
\`\`\`tsx
486-
{\`import { useForm } from "payload/components/forms";
485+
\\\`\\\`\\\`tsx
486+
{\\\`import { useForm } from "payload/components/forms";
487487
488488
export const CustomArrayManager = () => {
489489
const { removeFieldRow } = useForm()
@@ -501,13 +501,13 @@ export const CustomArrayManager = () => {
501501
Remove Row
502502
</button>
503503
)
504-
}\`}
505-
\`\`\`
504+
}\\\`}
505+
\\\`\\\`\\\`
506506
507507
An example config to go along with the Custom Component
508508
509-
\`\`\`tsx
510-
{\`const ExampleCollection = {
509+
\\\`\\\`\\\`tsx
510+
{\\\`const ExampleCollection = {
511511
slug: "example-collection",
512512
fields: [
513513
{
@@ -530,8 +530,8 @@ An example config to go along with the Custom Component
530530
},
531531
},
532532
],
533-
}\`}
534-
\`\`\`
533+
}\\\`}
534+
\\\`\\\`\\\`
535535
`
536536
}
537537
],
@@ -555,23 +555,23 @@ An example config to go along with the Custom Component
555555
rows={[
556556
[
557557
{
558-
value: "**\`path\`**",
558+
value: "**\\\`path\\\`**",
559559
},
560560
{
561561
value: "The path to the array or block field",
562562
},
563563
],
564564
[
565565
{
566-
value: "**\`rowIndex\`**",
566+
value: "**\\\`rowIndex\\\`**",
567567
},
568568
{
569569
value: "The index of the row to replace",
570570
},
571571
],
572572
[
573573
{
574-
value: "**\`data\`**",
574+
value: "**\\\`data\\\`**",
575575
},
576576
{
577577
value: "The data to replace within the row",
@@ -583,8 +583,8 @@ An example config to go along with the Custom Component
583583
584584
585585
586-
\`\`\`tsx
587-
{\`import { useForm } from "payload/components/forms";
586+
\\\`\\\`\\\`tsx
587+
{\\\`import { useForm } from "payload/components/forms";
588588
589589
export const CustomArrayManager = () => {
590590
const { replaceFieldRow } = useForm()
@@ -607,13 +607,13 @@ export const CustomArrayManager = () => {
607607
Replace Row
608608
</button>
609609
)
610-
}\`}
611-
\`\`\`
610+
}\\\`}
611+
\\\`\\\`\\\`
612612
613613
An example config to go along with the Custom Component
614614
615-
\`\`\`tsx
616-
{\`const ExampleCollection = {
615+
\\\`\\\`\\\`tsx
616+
{\\\`const ExampleCollection = {
617617
slug: "example-collection",
618618
fields: [
619619
{
@@ -636,8 +636,8 @@ An example config to go along with the Custom Component
636636
},
637637
},
638638
],
639-
}\`}
640-
\`\`\`
639+
}\\\`}
640+
\\\`\\\`\\\`
641641
`
642642
}
643643
],

docs/rest-api/overview.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ Note: Collection slugs must be formatted in kebab-case
5151
},
5252
},
5353
drawerContent: `
54-
#### Additional `find` query parameters
54+
#### Additional \\\`find\\\` query parameters
5555
56-
The `find` endpoint supports the following additional query parameters:
56+
The \\\`find\\\` endpoint supports the following additional query parameters:
5757
5858
- [sort](/docs/queries/overview#sort) - sort by field
5959
- [where](/docs/queries/overview) - pass a where query to constrain returned documents

0 commit comments

Comments
 (0)