Skip to content

Commit f0b80f4

Browse files
authored
Merge pull request #5216 from Rageking8/elide-extraneous-leading-empty-lines-in-code-snippets
Elide extraneous leading empty lines in code snippets
2 parents 0d36b2f + 6243a21 commit f0b80f4

22 files changed

+15
-51
lines changed

docs/c-language/extern-storage-class-specifier.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
---
2-
description: "Learn more about: extern Storage-Class Specifier"
32
title: "extern Storage-Class Specifier"
3+
description: "Learn more about: extern Storage-Class Specifier"
44
ms.date: "07/10/2018"
55
helpviewer_keywords: ["extern keyword [C]", "storage class specifiers, extern", "extern keyword [C], storage class specifier", "external linkage, storage-class specifiers", "external linkage, extern modifier"]
6-
ms.assetid: 6e16d927-291f-49e4-986c-9d91a482a441
76
---
87
# extern Storage-Class Specifier
98

@@ -14,12 +13,11 @@ A variable declared with the **`extern`** storage-class specifier is a reference
1413
This example illustrates internal- and external-level declarations:
1514

1615
```c
17-
1816
// Source1.c
1917

2018
int i = 1;
2119

22-
// Source2. c
20+
// Source2.c
2321

2422
#include <stdio.h>
2523

docs/c-runtime-library/reference/and.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
description: "Learn more about: and"
32
title: "and"
3+
description: "Learn more about: and"
44
ms.date: "11/04/2016"
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["ISO646/and", "and", "std.and", "std::and"]
99
helpviewer_keywords: ["and macro"]
10-
ms.assetid: 2644ab57-8e1b-48f0-9021-cafe3e26bdc4
1110
---
1211
# `and`
1312

@@ -16,7 +15,6 @@ An alternative to the && operator.
1615
## Syntax
1716

1817
```C
19-
2018
#define and &&
2119
```
2220

docs/c-runtime-library/reference/bitand.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
description: "Learn more about: bitand"
32
title: "bitand"
3+
description: "Learn more about: bitand"
44
ms.date: "11/04/2016"
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["std::bitand", "std.bitand", "ISO646/bitand", "bitand"]
99
helpviewer_keywords: ["bitand function"]
10-
ms.assetid: 279cf9b5-fac1-49de-b329-f1a31b3481fe
1110
---
1211
# `bitand`
1312

@@ -16,7 +15,6 @@ An alternative to the & operator.
1615
## Syntax
1716

1817
```C
19-
2018
#define bitand &
2119
```
2220

docs/c-runtime-library/reference/bitor.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
description: "Learn more about: bitor"
32
title: "bitor"
3+
description: "Learn more about: bitor"
44
ms.date: "11/04/2016"
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["ISO646/bitor", "bitor", "std.bitor", "std::bitor"]
99
helpviewer_keywords: ["bitor function"]
10-
ms.assetid: 3c0a3711-9c74-41f2-b400-2f7797da30d1
1110
---
1211
# `bitor`
1312

@@ -16,7 +15,6 @@ An alternative to the `|` operator.
1615
## Syntax
1716

1817
```C
19-
2018
#define bitor |
2119
```
2220

docs/c-runtime-library/reference/crtcheckmemory.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _CrtCheckMemory"
32
title: "_CrtCheckMemory"
3+
description: "Learn more about: _CrtCheckMemory"
44
ms.date: "11/04/2016"
55
api_name: ["_CrtCheckMemory"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["CrtCheckMemory", "_CrtCheckMemory"]
1010
helpviewer_keywords: ["_CrtCheckMemory function", "CrtCheckMemory function"]
11-
ms.assetid: 457cc72e-60fd-4177-ab5c-6ae26a420765
1211
---
1312
# `_CrtCheckMemory`
1413

@@ -17,7 +16,6 @@ Confirms the integrity of the memory blocks allocated in the debug heap (debug v
1716
## Syntax
1817

1918
```C
20-
2119
int _CrtCheckMemory( void );
2220
```
2321

docs/c-runtime-library/reference/crtdumpmemoryleaks.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: _CrtDumpMemoryLeaks"
32
title: "_CrtDumpMemoryLeaks"
3+
description: "Learn more about: _CrtDumpMemoryLeaks"
44
ms.date: "11/04/2016"
55
api_name: ["_CrtDumpMemoryLeaks"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
@@ -16,7 +16,6 @@ Dumps all the memory blocks in the debug heap when a memory leak has occurred (d
1616
## Syntax
1717

1818
```C
19-
2019
int _CrtDumpMemoryLeaks( void );
2120
```
2221

docs/c-runtime-library/reference/kbhit.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _kbhit"
32
title: "_kbhit"
3+
description: "Learn more about: _kbhit"
44
ms.date: "4/2/2020"
55
api_name: ["_kbhit", "_o__kbhit"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_kbhit", "conio/_kbhit"]
1010
helpviewer_keywords: ["keyboard input", "user input, checking for keyboard", "kbhit function", "console", "console, checking", "keyboards, keyboard input", "_kbhit function", "keyboards, checking input"]
11-
ms.assetid: e82a1cc9-bbec-4150-b678-a7e433220fe4
1211
---
1312
# `_kbhit`
1413

@@ -20,7 +19,6 @@ Checks the console for keyboard input.
2019
## Syntax
2120

2221
```C
23-
2422
int _kbhit( void );
2523
```
2624

docs/c-runtime-library/reference/mkdir-wmkdir.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _mkdir, _wmkdir"
32
title: "_mkdir, _wmkdir"
3+
description: "Learn more about: _mkdir, _wmkdir"
44
ms.date: "4/2/2020"
55
api_name: ["_wmkdir", "_mkdir", "_o__mkdir", "_o__wmkdir"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-filesystem-l1-1-0.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_mkdir", "tmkdir", "_tmkdir", "wmkdir", "_wmkdir"]
1010
helpviewer_keywords: ["_wmkdir function", "folders [C++], creating", "wmkdir function", "directories [C++], creating", "mkdir function", "tmkdir function", "_mkdir function", "_tmkdir function"]
11-
ms.assetid: 7f22d01d-63a5-4712-a6e7-d34878b2d840
1211
---
1312
# `_mkdir`, `_wmkdir`
1413

@@ -17,7 +16,6 @@ Creates a new directory.
1716
## Syntax
1817

1918
```C
20-
2119
int _mkdir(
2220
const char *dirname
2321
);

docs/c-runtime-library/reference/not.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
description: "Learn more about: not"
32
title: "not"
3+
description: "Learn more about: not"
44
ms.date: "11/04/2016"
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["std::not", "std.not", "ISO646/not", "not"]
99
helpviewer_keywords: ["not function"]
10-
ms.assetid: d2ddbd5c-33c0-4aff-8961-feac155b4ba1
1110
---
1211
# `not`
1312

@@ -16,7 +15,6 @@ An alternative to the **`!`** operator.
1615
## Syntax
1716

1817
```C
19-
2018
#define not !
2119
```
2220

docs/c-runtime-library/reference/or-eq.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
---
2-
description: "Learn more about: or_eq"
32
title: "or_eq"
3+
description: "Learn more about: or_eq"
44
ms.date: "11/04/2016"
55
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
66
api_type: ["DLLExport"]
77
topic_type: ["apiref"]
88
f1_keywords: ["std::or_eq", "ISO646/or_eq", "or_eq", "std.or_eq"]
99
helpviewer_keywords: ["or_eq function"]
10-
ms.assetid: 1eb92464-ed58-40d8-a30e-f0a6aa2f4318
1110
---
1211
# `or_eq`
1312

@@ -16,7 +15,6 @@ An alternative to the `|=` operator.
1615
## Syntax
1716

1817
```C
19-
2018
#define or_eq |=
2119
```
2220

docs/c-runtime-library/reference/rmtmp.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _rmtmp"
32
title: "_rmtmp"
3+
description: "Learn more about: _rmtmp"
44
ms.date: "4/2/2020"
55
api_name: ["_rmtmp", "_o__rmtmp"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-stdio-l1-1-0.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_rmtmp"]
1010
helpviewer_keywords: ["removing temporary files", "_rmtmp function", "files [C++], temporary", "rmtmp function", "files [C++], removing", "temporary files [C++], removing"]
11-
ms.assetid: 7419501e-2587-4f2a-b469-0dca07f84736
1211
---
1312
# `_rmtmp`
1413

@@ -17,7 +16,6 @@ Removes temporary files.
1716
## Syntax
1817

1918
```C
20-
2119
int _rmtmp( void );
2220
```
2321

docs/c-runtime-library/reference/rotl-rotl64-rotr-rotr64.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_rotr64", "rotl64", "_rotl64", "rotr64", "rotr", "_rotr", "_rotl", "rotl"]
1010
helpviewer_keywords: ["rotl64 function", "_rotl function", "rotr function", "rotr64 function", "_rotr function", "rotl function", "_rotl64 function", "rotating bits", "_rotr64 function", "bits, rotating"]
11-
ms.assetid: cfce439b-366f-4584-8ab1-d527b13fcfc6
1211
---
1312
# `_rotl`, `_rotl64`, `_rotr`, `_rotr64`
1413

@@ -17,7 +16,6 @@ Rotates bits to the left (**`_rotl`**) or right (**`_rotr`**).
1716
## Syntax
1817

1918
```C
20-
2119
unsigned int _rotl(
2220
unsigned int value,
2321
int shift

docs/c-runtime-library/reference/rtc-numerrors.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
11
---
2-
description: "Learn more about: _RTC_NumErrors"
32
title: "_RTC_NumErrors"
3+
description: "Learn more about: _RTC_NumErrors"
44
ms.date: "11/04/2016"
55
api_name: ["_RTC_NumErrors"]
66
api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll"]
77
api_type: ["DLLExport"]
88
topic_type: ["apiref"]
99
f1_keywords: ["_RTC_NumErrors", "RTC_NumErrors"]
1010
helpviewer_keywords: ["run-time errors", "_RTC_NumErrors function", "RTC_NumErrors function"]
11-
ms.assetid: 7e82adae-38e2-4f8b-bc0b-37bda8109fd1
1211
---
1312
# `_RTC_NumErrors`
1413

@@ -17,7 +16,6 @@ Returns the total number of errors that can be detected by run-time error checks
1716
## Syntax
1817

1918
```C
20-
2119
int _RTC_NumErrors( void );
2220
```
2321

docs/code-quality/annotating-structs-and-classes.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
2-
description: "Learn more about: Annotating Structs and Classes"
32
title: Annotating Structs and Classes
3+
description: "Learn more about: Annotating Structs and Classes"
44
ms.date: 06/28/2019
55
ms.topic: "conceptual"
66
f1_keywords:
@@ -19,7 +19,6 @@ f1_keywords:
1919
- "_Field_size_full_"
2020
- "_Field_size_full_opt_"
2121
- "_Field_z_"
22-
ms.assetid: b8278a4a-c86e-4845-aa2a-70da21a1dd52
2322
---
2423
# Annotating Structs and Classes
2524

@@ -52,13 +51,11 @@ You can annotate struct and class members by using annotations that act like inv
5251
Applies to struct or class declaration. Indicates that a valid object of that type may be larger than the declared type, with the number of bytes being specified by `size`. For example:
5352

5453
```cpp
55-
5654
typedef _Struct_size_bytes_(nSize)
5755
struct MyStruct {
5856
size_t nSize;
5957
...
6058
};
61-
6259
```
6360

6461
The buffer size in bytes of a parameter `pM` of type `MyStruct *` is then taken to be:

docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_1.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Use make_shared function when possible.
32
auto sp1 = make_shared<Song>(L"The Beatles", L"Im Happy Just to Dance With You");
43

docs/cpp/codesnippet/CPP/how-to-create-and-use-shared-ptr-instances_6.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Initialize two separate raw pointers.
32
// Note that they contain the same values.
43
auto song1 = new Song(L"Village People", L"YMCA");

docs/cpp/codesnippet/CPP/how-to-create-and-use-unique-ptr-instances_3.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
class MyClass
32
{
43
private:

docs/cpp/codesnippet/CPP/smart-pointers-modern-cpp_2.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
class LargeObject
32
{
43
public:

docs/linux/deploy-run-and-debug-your-linux-project.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,6 @@ The **Content** property specifies whether the file will be deployed to the remo
135135
In some cases, you may require more control over your project's deployment. For example, some files that you want to deploy might be outside of your solution or you want to customize your remote deploy directory per file or directory. In these cases, append the following code block(s) to your .vcxproj file and replace "example.cpp" with the actual file names:
136136

137137
```xml
138-
139138
<ItemGroup>
140139
<RemoteDeploy Include="__example.cpp">
141140
<!-- This is the source Linux machine, can be empty if DeploymentType is LocalRemote -->
@@ -183,4 +182,4 @@ If you want complete control over your deployment, you can append the following
183182

184183
## See also
185184

186-
[C++ Debugging Properties (Linux C++)](prop-pages/debugging-linux.md)
185+
[C++ Debugging Properties (Linux C++)](prop-pages/debugging-linux.md)

docs/mfc/codesnippet/CPP/accessing-the-embedded-month-calendar-control_2.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
//create and initialize the font to be used
32
LOGFONT logFont = {0};
43
logFont.lfHeight = -12;

docs/mfc/codesnippet/CPP/cbitmapbutton-class_3.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
// Create the bitmap button (must include the BS_OWNERDRAW style).
32
pmyButton->Create(NULL, WS_CHILD | WS_VISIBLE | BS_OWNERDRAW,
43
CRect(10, 10, 100, 100), pParentWnd, 1);

docs/mfc/reference/codesnippet/CPP/cpagerctrl-class_5.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
void CCSplitButton_s2Dlg::OnXIsbuttoninvisible()
32
{
43
BOOL bLeft = m_pager.IsButtonInvisible(PGB_TOPORLEFT);

0 commit comments

Comments
 (0)