A fenced code block can have a info-string. This information can be used for highlighting.
```c++ title=main.cpp linestart=3
//
// code here
//
```
The first word of the info_string
is used to specify the language. If the language is supported, it will be syntax-highlighted using highlight.js.
You may supply these in info_string for advanced rendering.
title="main.cpp"
: sets title tag.linestart=3
: sets start line{main.cpp:10}
: sets title and line numberc++ title=main.cpp
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
{
// hello
cout << "Hello World!" << endl;
return 0;
}
c++ title=main.cpp linestart=1
1#include <iostream>2using namespace std;34int main(int argc, char* argv[])5{6 // hello7 cout << "Hello World!" << endl;8 9 return 0;10}11
c++ {main.cpp:1}
1#include <iostream>2using namespace std;34int main(int argc, char* argv[])5{6 // hello7 cout << "Hello World!" << endl;8 9 return 0;10}11