diff --git a/.travis.yml b/.travis.yml index ec7369c8..18a27402 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,3 +3,4 @@ language: bash script: - bash tests/dead_links.sh - bash tests/unreferenced_pages.sh + - bash tests/check_code_block_syntax.sh diff --git a/app_spip.md b/app_spip.md index fb51d7ab..880b41e6 100644 --- a/app_spip.md +++ b/app_spip.md @@ -20,7 +20,7 @@ $ sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh.git_ynh.gi ##### Update -``` +```bash sudo yunohost app upgrade --verbose spip -u https://github.com/YunoHost-Apps/spip_ynh.git_ynh.git ``` @@ -30,4 +30,4 @@ Access the administration of the site by entering the following address in your https://www.domain.tld/spip/ecrire -Make a "forgotten password" request to change your password, you will receive an email telling you how to change your password. \ No newline at end of file +Make a "forgotten password" request to change your password, you will receive an email telling you how to change your password. diff --git a/app_spip_fr.md b/app_spip_fr.md index b765947e..78310855 100644 --- a/app_spip_fr.md +++ b/app_spip_fr.md @@ -20,7 +20,7 @@ $ sudo yunohost app install https://github.com/YunoHost-Apps/spip_ynh.git #### Mise à jour -``` +```bash $ sudo yunohost app upgrade --verbose spip -u https://github.com/YunoHost-Apps/spip_ynh.git ``` diff --git a/noaccess_fr.md b/noaccess_fr.md index 059fc32a..94d19af8 100644 --- a/noaccess_fr.md +++ b/noaccess_fr.md @@ -73,7 +73,7 @@ Si vous utilisez un VPN a IP fixe, peut être que celui-ci est arrivé à expira Dans ce cas, vous pouvez peut être accéder à votre serveur avec son IP locale s'agissant probablement d'un serveur auto-hébergé chez-vous. Pour connaître votre ip locale, certaines BOX propose une cartographie du réseau en cours avec les équipements connectés. Sinon, en ligne de commande avec linux: -``` +```bash sudo arp-scan --local ``` @@ -100,7 +100,7 @@ Dans ce cas il faut renouveler le nom de domaine (si ile st encore temps. Si votre serveur ping avec son ip mais ne ping pas avec le nom de domaine alors il y a un problème de configuration au niveau du champs A. Si c'est un nom de domaine fournit par YunoHost, lancez -``` +```bash yunohost dyndns update ``` diff --git a/tests/check_code_block_syntax.sh b/tests/check_code_block_syntax.sh new file mode 100644 index 00000000..62e83a0f --- /dev/null +++ b/tests/check_code_block_syntax.sh @@ -0,0 +1,17 @@ +returncode=0 +for FILE in $(ls *.md) +do + NB_OPENING=$(grep -E "^ *\`\`\` *\w+ *$" $FILE | wc -l) + NB_CLOSE=$(grep -E "^ *\`\`\` *$" $FILE | wc -l) + if [[ "$NB_OPENING" != "$NB_CLOSE" ]] + then + echo "There are some mistakes in code block syntax in $FILE ..." + returncode=1 + fi +done + +if [[ $returncode == 1 ]] +then + echo "Make sure that all the code block in the problematic files do specific the language in the opening backticks (for example, \`\`\`bash). Otherwise, rendering in the actual website will be broken because of a bug in markdown parsing lib..." + exit 1 +fi