Skip to content

Commit 54e0c33

Browse files
committed
fix: replace src to dest
1 parent 4af7726 commit 54e0c33

File tree

7 files changed

+14
-14
lines changed

7 files changed

+14
-14
lines changed

src/components/NamedReq.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ interface Props {
99
}
1010
1111
const { name, bold, displayName, nolink } = Astro.props;
12-
const src = `/cpp/named_req/${name}`;
12+
const dest = `/cpp/named_req/${name}`;
1313
1414
const text = displayName ?? name;
1515
1616
const As = nolink ? Fragment : DocLink;
17-
const asProps = nolink ? {} : { src };
17+
const asProps = nolink ? {} : { dest };
1818
---
1919

2020
<As {...asProps}>

src/components/header/Header.astro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export interface Props {
1111
1212
const { lang, name, displayName, nolink } = Astro.props;
1313
const langPrefix = lang == "C" ? "/c" : "/cpp";
14-
const src = `${langPrefix}/library/headers/${name}`;
14+
const dest = `${langPrefix}/library/headers/${name}`;
1515
1616
const extension = lang === "C" ? ".h" : "";
1717
const text = displayName ?? `<${name}${extension}>`;
1818
1919
const As = nolink ? Fragment : DocLink;
20-
const asProps = nolink ? {} : { src };
20+
const asProps = nolink ? {} : { dest };
2121
---
2222

2323
<As {...asProps}>

src/content/docs/c/comment.mdx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,21 +14,21 @@ Comments serve as a sort of in-code documentation. When inserted into a program,
1414
1) Often known as "C-style" or "multi-line" comments.
1515
2) Often known as "C++-style" or "single-line" comments.
1616

17-
All comments are removed from the program at <DocLink src="/c/language/translation_phases">translation phase 3</DocLink> by replacing each comment with a single whitespace character.
17+
All comments are removed from the program at <DocLink dest="/c/language/translation_phases">translation phase 3</DocLink> by replacing each comment with a single whitespace character.
1818

1919
### C-style
2020

2121
C-style comments are usually used to comment large blocks of text or small fragments of code; however, they can be used to comment single lines. To insert text as a C-style comment, simply surround the text with `/*` and `*/`. C-style comments tell the compiler to ignore all content between `/*` and `*/`. Although it is not part of the C standard, `/**` and `**/` are often used to indicate documentation blocks; this is legal because the second asterisk is simply treated as part of the comment.
2222

23-
Except within a <DocLink src="/c/language/character_constant">character constant</DocLink>, a <DocLink src="/c/language/string_literal">string literal</DocLink>, or a comment, the characters `/*` introduce a comment. The contents of such a comment are examined only to identify multibyte characters and to find the characters `*/` that terminate the comment. C-style comments cannot be nested.
23+
Except within a <DocLink dest="/c/language/character_constant">character constant</DocLink>, a <DocLink dest="/c/language/string_literal">string literal</DocLink>, or a comment, the characters `/*` introduce a comment. The contents of such a comment are examined only to identify multibyte characters and to find the characters `*/` that terminate the comment. C-style comments cannot be nested.
2424

2525
<RevisionBlock since="C99">
2626

2727
### C++-style
2828

2929
C++-style comments are usually used to comment single lines of text or code; however, they can be placed together to form multi-line comments. To insert text as a C++-style comment, simply precede the text with `//` and follow the text with the new line character. C++-style comments tell the compiler to ignore all content between `//` and a new line.
3030

31-
Except within a <DocLink src="/c/language/character_constant">character constant</DocLink>, a <DocLink src="/c/language/string_literal">string literal</DocLink>, or a comment, the characters `//` introduce a comment that includes all multibyte characters up to, but not including, the next new-line character. The contents of such a comment are examined only to identify multibyte characters and to find the new-line character that terminates the comment. C++-style comments can be nested:
31+
Except within a <DocLink dest="/c/language/character_constant">character constant</DocLink>, a <DocLink dest="/c/language/string_literal">string literal</DocLink>, or a comment, the characters `//` introduce a comment that includes all multibyte characters up to, but not including, the next new-line character. The contents of such a comment are examined only to identify multibyte characters and to find the new-line character that terminates the comment. C++-style comments can be nested:
3232

3333
```c
3434
// y = f(x); // invoke algorithm
@@ -53,7 +53,7 @@ A C++-style comment may appear within a C-style comment; this is a mechanism for
5353

5454
### Notes
5555

56-
Because comments <DocLink src="/c/language/translation_phases">are removed</DocLink> before the preprocessor stage, a macro cannot be used to form a comment and an unterminated C-style comment doesn't spill over from an #include'd file.
56+
Because comments <DocLink dest="/c/language/translation_phases">are removed</DocLink> before the preprocessor stage, a macro cannot be used to form a comment and an unterminated C-style comment doesn't spill over from an #include'd file.
5757

5858
```c
5959
/* An attempt to use a macro to form a comment. */
@@ -151,6 +151,6 @@ Hello, again
151151

152152
<DescList>
153153
<Desc>
154-
<DocLink slot="item" src="/cpp/comments">C++ documentation</DocLink> for <span>Comments</span>
154+
<DocLink slot="item" dest="/cpp/comments">C++ documentation</DocLink> for <span>Comments</span>
155155
</Desc>
156156
</DescList>

src/content/docs/cpp/keywords.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,6 @@ The following tokens are recognized by the <DocLink dest="/cpp/preprocessor">pre
4848

4949
<DescList>
5050
<Desc>
51-
<DocLink slot="item" src="/c/keyword">C documentation</DocLink> for keywords
51+
<DocLink slot="item" dest="/c/keyword">C documentation</DocLink> for keywords
5252
</Desc>
5353
</DescList>

src/content/docs/cpp/language/comments.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ Output:
107107

108108
<DescList>
109109
<Desc>
110-
<DocLink slot="item" src="/c/comment">C documentation</DocLink> for <span>comment</span>
110+
<DocLink slot="item" dest="/c/comment">C documentation</DocLink> for <span>comment</span>
111111
</Desc>
112112
</DescList>

src/content/docs/cpp/language/main_function.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,6 @@ The following behavior-changing defect reports were applied retroactively to pre
189189
190190
<DescList>
191191
<Desc>
192-
<DocLink slot="item" src="/c/language/main_function"> C documentation</DocLink> for <span> **main function** </span>
192+
<DocLink slot="item" dest="/c/language/main_function"> C documentation</DocLink> for <span> **main function** </span>
193193
</Desc>
194194
</DescList>

src/content/docs/development/guide/doc-everything.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,15 +363,15 @@ By setting the `section` attribute, you can link to a specific section (or any H
363363
import DocLink from "@components/DocLink.astro";
364364

365365
<DocLink
366-
src="/cpp/library/standard_library"
366+
dest="/cpp/library/standard_library"
367367
section="standard-library-hardening">Standard library hardening</DocLink>
368368
allows turning some instances of undefined behavior in the standard library
369369
into a contract violation.
370370
```
371371

372372
<Card title="Preview">
373373
<DocLink
374-
src="/cpp/library/standard_library"
374+
dest="/cpp/library/standard_library"
375375
section="standard-library-hardening">Standard library hardening</DocLink>
376376
allows turning some instances of undefined behavior in the standard library
377377
into a contract violation.

0 commit comments

Comments
 (0)