mirror of
https://github.com/benjaminion/upgrading-ethereum-book.git
synced 2026-01-09 14:38:08 -05:00
Add LTeX for grammar checking
This commit is contained in:
14
bin/util/check_grammar.sh
Executable file
14
bin/util/check_grammar.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Run LTeX grammar checker: https://valentjn.github.io/ltex/index.html
|
||||
|
||||
ltex=~/bin/ltex-ls-15.2.0/bin/ltex-cli
|
||||
config=$(dirname "$0")/ltex_config.json
|
||||
temp=$(mktemp /tmp/ltex_XXXXXXXX.md)
|
||||
|
||||
# Image links seems to cause a problem for LTeX, so strip them
|
||||
cat $1 | sed 's/^!\[.*$//' > $temp
|
||||
|
||||
$ltex --client-configuration=$config $temp | sed "s:^$temp:\n$1:"
|
||||
|
||||
rm -f $temp
|
||||
23
bin/util/ltex_config.json
Normal file
23
bin/util/ltex_config.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"language": "en-GB",
|
||||
"disabledRules": {
|
||||
"en-GB": [
|
||||
"MORFOLOGIK_RULE_EN_GB",
|
||||
"OXFORD_SPELLING_Z_NOT_S",
|
||||
"ARROWS",
|
||||
"WHITESPACE_RULE",
|
||||
"WANNA",
|
||||
"EN_WORD_COHERENCY",
|
||||
"SOME_OF_THE",
|
||||
"SMALL_NUMBER_OF"
|
||||
]
|
||||
},
|
||||
"markdown": {
|
||||
"nodes": {}
|
||||
},
|
||||
"hiddenFalsePositives": {
|
||||
"en-GB": [
|
||||
"{\"rule\": \"EN_COMPOUNDS\", \"sentence\": \"block chain\"}"
|
||||
]
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user