Fix code fences

This commit is contained in:
David Eisinger
2025-02-16 15:00:39 -05:00
parent 31087c4349
commit 8e5e3781af
9 changed files with 18 additions and 18 deletions

View File

@@ -35,7 +35,7 @@ want something you can drop into a GitHub Actions YAML file to lint your
commits, here it is (but stick around and I'll break it down and then
show how to do it in a few other languages):
``` yaml
```yaml
steps:
- name: Checkout code
uses: actions/checkout@v3
@@ -79,7 +79,7 @@ If you want to try this out locally (or perhaps modify the script to
validate messages in a different way), here's a `docker run` command
you can use:
``` bash
```bash
echo '[#123] Message 1
[n/a] Message 2
[#122] Message 3' | docker run --rm -i ruby:3.2.1 ruby -e '
@@ -104,7 +104,7 @@ several of Viget's other favorites:
### JavaScript
``` bash
```bash
git log --format=format:%s HEAD ^origin/main | node -e "
let msgs = require('fs').readFileSync(0).toString().trim().split('\n');
for (let msg of msgs) {
@@ -117,7 +117,7 @@ git log --format=format:%s HEAD ^origin/main | node -e "
To test:
``` bash
```bash
echo '[#123] Message 1
[n/a] Message 2
[#122] Message 3' | docker run --rm -i node:18.15.0 node -e "
@@ -132,7 +132,7 @@ echo '[#123] Message 1
### PHP
``` bash
```bash
git log --format=format:%s HEAD ^origin/main | php -r '
while ($msg = fgets(STDIN)) {
if (preg_match("/^\[(#\d+|n\/a)\]/", $msg)) { continue; }
@@ -144,7 +144,7 @@ git log --format=format:%s HEAD ^origin/main | php -r '
To test:
``` bash
```bash
echo '[#123] Message 1
[n/a] Message 2
[#122] Message 3' | docker run --rm -i php:8.2.4 php -r '
@@ -158,7 +158,7 @@ echo '[#123] Message 1
### Python
``` bash
```bash
git log --format=format:%s HEAD ^origin/main | python -c '
import sys
import re
@@ -172,7 +172,7 @@ for msg in sys.stdin:
To test:
``` bash
```bash
echo '[#123] Message 1
[n/a] Message 2
[#122] Message 3' | docker run --rm -i python:3.11.3 python -c '