-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for handling line break in document attribute
- Loading branch information
Showing
9 changed files
with
191 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif // __cplusplus | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif // __cplusplus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif // __cplusplus | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif // __cplusplus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
#include <cstdarg> | ||
#include <cstdint> | ||
#include <cstdlib> | ||
#include <new> | ||
|
||
extern "C" { | ||
|
||
///With doc attr, each attr contribute to one line of document | ||
///like this one with a new line character at its end | ||
///and this one as well. So they are in the same paragraph | ||
/// | ||
///Line ends with one new line should not break | ||
/// | ||
///Line ends with two spaces and a new line | ||
///should break to next line | ||
/// | ||
///Line ends with two new lines | ||
/// | ||
///Should break to next paragraph | ||
void root(); | ||
|
||
} // extern "C" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
#include <stdarg.h> | ||
#include <stdbool.h> | ||
#include <stdint.h> | ||
#include <stdlib.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif // __cplusplus | ||
|
||
/** | ||
*With doc attr, each attr contribute to one line of document | ||
*like this one with a new line character at its end | ||
*and this one as well. So they are in the same paragraph | ||
* | ||
*Line ends with one new line should not break | ||
* | ||
*Line ends with two spaces and a new line | ||
*should break to next line | ||
* | ||
*Line ends with two new lines | ||
* | ||
*Should break to next paragraph | ||
*/ | ||
void root(void); | ||
|
||
#ifdef __cplusplus | ||
} // extern "C" | ||
#endif // __cplusplus |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#[doc="With doc attr, each attr contribute to one line of document"] | ||
#[doc="like this one with a new line character at its end"] | ||
#[doc="and this one as well. So they are in the same paragraph"] | ||
#[doc=""] | ||
#[doc="Line ends with one new line\nshould not break"] | ||
#[doc=""] | ||
#[doc="Line ends with two spaces and a new line \nshould break to next line"] | ||
#[doc=""] | ||
#[doc="Line ends with two new lines\n\nShould break to next paragraph"] | ||
#[no_mangle] | ||
pub extern "C" fn root() { | ||
} |