Skip to content

Commit

Permalink
Merge pull request #2 from Hexlet/add-adoc
Browse files Browse the repository at this point in the history
add adoc
  • Loading branch information
dzencot authored Mar 19, 2024
2 parents 51aeb73 + baadd06 commit b6b4e23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 3 additions & 3 deletions bin/ltcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,14 @@ fix() {
echo -e "Было:\n${text}\n"

echo -e "Стало:\n${result}\n"

cat <<< "$result" > "$filepath"
}

if [[ "$@" == "fix" ]]; then
echo "Start fixing =>"

find /content -type f -name "*.md" | while read -r filepath; do
find /content -type f \( -iname \*.md -o -iname \*.adoc \) | while read -r filepath; do
echo -e "\n$filepath"
file_content=$(cat "$filepath")
fix "$file_content" "$filepath"
Expand All @@ -83,7 +83,7 @@ else

echo "Start checking =>"

find /content -type f -name "*.md" | while read -r filepath; do
find /content -type f \( -iname \*.md -o -iname \*.adoc \) | while read -r filepath; do
echo -e "\n$filepath"
file_content=$(cat "$filepath")
check "$file_content"
Expand Down
7 changes: 7 additions & 0 deletions fixtures/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
файл где мы написали мсли и все пошло не по плану . А да забыл запятую опять

* `*`: умножение
* `/`: деление
* `-`: вычитание
* "%": https://ru.wikipedia.org/wiki/Деление_с_остатком[остаток от деления]
* `+**+`: возведение в степень

0 comments on commit b6b4e23

Please sign in to comment.