forked from Y-Less/console-markdown
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
103 lines (77 loc) · 2.45 KB
/
main.cpp
File metadata and controls
103 lines (77 loc) · 2.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
#include <console-markdown/CMDMD.hpp>
#include <iostream>
#ifdef CONMD_WINDOWS
#include <windows.h>
#endif
#include "subhook/subhook.h"
using namespace cmdmd::Literals;
int main()
{
cmdmd::Init();
std::string output = R"(
____
# Heading 1
**hello** _there_
## Heading 2
### Heading 3
#### Heading 4
____
How are you?
And is this a new paragraph?
You should need two new lines to make a new paragraph,
so this should all be wrapped on one line. Of course that does depend on the width of the console (and not the line length) so check that as well. We may need more code for wrapping text.
```pawn
hook OnPlayerConnect(playerid)
{
for (new i = 0; i != 10; ++i)
{
printf("Markdown!");
}
}
```
```cpp
class MyClass : public BaseClass
{
private:
virtual unsigned int Method(float a, Data const & b) override = 0;
}
```
Output code with:
\`\`\`cpp
// Code goes here.
\`\`\`
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x02BE4788, 0x00000000, 0x00FFFE00, 0x00000007, 0x0003C000, 0x00000000,
0x02010771, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007, 0x00000000, 0x00000000,
0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007, 0x0000C000, 0x00000000,
```
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007,
0x031D2775, 0x00000000, 0x00FFFE00, 0x00000007,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007,
0x02BE4788, 0x00000000, 0x00FFFE00, 0x00000007,
0x02010771, 0x00000000, 0x00FFFE00, 0x00000007,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007,
0x02000700, 0x00000000, 0x00FFFE00, 0x00000007,
0x029A0FCE, 0x00000000, 0x00FFFE00, 0x00000007,
```
* One
* Two
* Three
* Four
I hope you are OK, like `someCode()` is.
1. One
2. One
3. One1
)"_cmdmd;
//WriteConsoleA(GetStdHandle(STD_OUTPUT_HANDLE), output.c_str(), output.length(), NULL, NULL);
std::cout << output;
return 0;
}