Skip to content

Commit 91075eb

Browse files
Fix @format decorator doc not escaping correctly (#1851)
1 parent 1fa0aa0 commit 91075eb

3 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@typespec/compiler",
5+
"comment": "Fix `@format` decorator doc.",
6+
"type": "none"
7+
}
8+
],
9+
"packageName": "@typespec/compiler"
10+
}

docs/standard-library/built-in-decorators.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@ message: string;
108108
### `@format` {#@format}
109109

110110
Specify a known data format hint for this string type. For example `uuid`, `uri`, etc.
111-
This differ from the
111+
This differs from the `@pattern` decorator which is meant to specify a regular expression while `@format` accepts a known format name.
112+
The format names are open ended and are left to emitter to interpret.
112113

113114
```typespec
114115
dec format(target: string | bytes | ModelProperty, format: string)

packages/compiler/lib/decorators.tsp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ extern dec error(target: Model);
9696

9797
/**
9898
* Specify a known data format hint for this string type. For example `uuid`, `uri`, etc.
99-
* This differ from the @pattern decorator that is meant to specify a regular expression while @format takes in a known format name.
99+
* This differs from the `@pattern` decorator which is meant to specify a regular expression while `@format` accepts a known format name.
100100
* The format names are open ended and are left to emitter to interpret.
101101
*
102102
* @param format format name.

0 commit comments

Comments
 (0)