Markdown Test


Testing for various markdown components on my blog

Jan 18, 2021

4 min read




Basic text
hr1

hr2

hr3

setext heading1

setext heading2

heading

heading

heading
heading

heading

heading

code block
1x++;
2x--;
code fence
1print('hello world');
<h1>tag test</h1>
1System.out.println("hello world!");
link1

block

quo te
nested block
quote
  • a
  • b
  • a
  • b
  • a
  • b
  1. a
  2. b
em1 em2 em3 em4 link2
image desc
https://williamlin.io line
break
check
hi code
1code
1# EGRA IHTA
2text = "F oI pSd Ws T"
3result = ""
4for i in text:
5  if ord(i) == 32:
6    result += i
7  elif (i.isupper()):
8    result += chr((ord(i) + key1 - 65) % 26 + 65)
9  else:
10    result += chr((ord(i) + key2 - 97) % 26 + 97)
1// SBTI AEWT
2vector<char> v;
3map<char, int> mp;
4void a(char c) {
5	mp[c]=v.size();
6	v.push_back(c);
7}
8int main() {
9	ios::sync_with_stdio(0);
10	cin.tie(0);
11
12	for(int i=0; i<26; ++i)
13		a('a'+i);
14	for(int i=0; i<10; ++i)
15		a('0'+i);
16	for(char c : {' ', '=', '+', '-', '*', '/', '^', '&', '|'})
17		a(c);
18	string s="yhfgkndgillj4pcba948|o07jnw80higekjd", t(36, ' ');
19	//        |     |     |     |     |     |     |
20	int p[6];
21	for(int i=0; i<6; ++i)
22		cin >> p[i], --p[i];
23	for(int i=0; i<6; ++i)
24		for(int j=0; j<6; ++j)
25			t[p[i]*6+p[j]]=s[i*6+j];
26	s=t;
27	int key;
28	cin >> key;
29	for(int i=0; i<36; ++i)
30		s[i]=v[(mp[s[i]]+key)%v.size()];
31	cout << s << endl;
32}
1// TAII BTTL
2public class Main {
3	public static void main(String[] args) {
4		Scanner sc = new Scanner(System.in);
5		int key=sc.nextInt();
6		char[] s="HQIX PTLI 1892".toCharArray();
7		for(int i=0; i<4; ++i)
8			s[i]=(char)((s[i]-'A'+key)%26+'A');
9		for(int i=5; i<9; ++i)
10			s[i]=(char)((s[i]-'A'+key)%26+'A');
11		for(int i=10; i<14; ++i)
12			s[i]=(char)((s[i]-'0'+key)%10+'0');
13		System.out.println(s);
14	}
15}
1// OJIG UTTA
2var text="mwdkapacstmebolbdtbiljooggdwvhlbnrfk", result="";
3for(var i=0; i<text.length; ++i)
4	result += String.fromCharCode((text.charCodeAt(i)-97+key.charCodeAt(i%key.length)-97)%26+97);
5console.log(result);
1let nice=' ';
2export const Content(props) {
3	const comb = props.title + nice + props.desc;
4	return (
5		<>
6			<h1>{props.title}</h1>
7			<p>{comb}</p>
8			<a href="/blog">Back</a>
9		</>
10	);
11}
12/* old code
13export const Content(props) {
1// RNEM IOEL
2const text: string="mwdkapacstmebolbdtbiljooggdwvhlbnrfk";
3let result: string="";
4for(let i: number=0; i<text.length; ++i)
5	result += String.fromCharCode((text.charCodeAt(i)-97+key.charCodeAt(i%key.length)-97)%26+97);
6console.log(result);
14let nice = 'abc';
15/* Main Component */
16export default function Section(props: { title: string; desc: string }) {
17	let keys: string[] = ['???'];
18	keys.sort();
19	if(!isNaN(keys[0]+nice))
20		keys = keys.map(key => key.substr(1));
21	let [data, setData] = useState<string | null>(null);
22	useEffect(fetch().then(data => setData(data.posts[0].content)), []);
23	let ha=[+keys[3][0], +keys[0].substr(40, 2), +keys[0][3], +keys[0].substr(12, 2), +keys[4].substr(26, 2), null, +keys[4].substr(30, 2), +keys[2][0], null];
24	return (
25		<>
26			<h1>{props.title}</h1>
27			<p>
28				{
29					data?(
30						ha.map(x => x?data[x]:' ').join('')+data.substr(491, 7)+' '+data.substr(22, 5);
31					):(
32						'Loading...'
33					)
34				}
35			</p>
36			<a href="/blog">Back</a>
37		</>
38	);
39}

Share Tweet Share


Commenting features coming soon... In the meantime, feel free to contact me for any suggestions!