Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/awk -f
- BEGIN { in_code_block = 0 }
- /^```/ {
- if (!in_code_block) {
- in_code_block = 1;
- first_line = 1;
- } else {
- in_code_block = 0;
- print "";
- }
- }
- {
- if (in_code_block && !first_line) {
- print;
- }
- first_line = 0;
- }
Add Comment
Please, Sign In to add comment