Skip to content

Commit

Permalink
fix indent for editorconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVCaron committed Jan 8, 2024
1 parent 75d30bd commit 7083361
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 36 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,6 @@ indent_style = space

[*.{md,yml,yaml,html,css,scss,js,cff}]
indent_size = 2

[LICENSE]
indent_size = 1
68 changes: 34 additions & 34 deletions docs/deps/gh-md-toc
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ gh_toc_md2html() {
local gh_tmp_file_md=$gh_file_md
if [ "$skip_header" = "yes" ]; then
if grep -Fxq "<!--te-->" "$gh_src"; then
# cut everything before the toc
gh_tmp_file_md=$gh_file_md~~
sed '1,/<!--te-->/d' $gh_file_md > $gh_tmp_file_md
# cut everything before the toc
gh_tmp_file_md=$gh_file_md~~
sed '1,/<!--te-->/d' $gh_file_md > $gh_tmp_file_md
fi
fi

Expand Down Expand Up @@ -154,16 +154,16 @@ gh_toc(){
else
local rawhtml=$(gh_toc_md2html "$gh_src" "$skip_header")
if [ "$rawhtml" == "XXNetworkErrorXX" ]; then
echo "Parsing local markdown file requires access to github API"
echo "Please make sure curl is installed and check your network connectivity"
exit 1
echo "Parsing local markdown file requires access to github API"
echo "Please make sure curl is installed and check your network connectivity"
exit 1
fi
if [ "$rawhtml" == "XXRateLimitXX" ]; then
echo "Parsing local markdown file requires access to github API"
echo "Error: You exceeded the hourly limit. See: https://developer.github.com/v3/#rate-limiting"
TOKEN_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"
echo "or place GitHub auth token here: ${TOKEN_FILE}"
exit 1
echo "Parsing local markdown file requires access to github API"
echo "Error: You exceeded the hourly limit. See: https://developer.github.com/v3/#rate-limiting"
TOKEN_FILE="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/token.txt"
echo "or place GitHub auth token here: ${TOKEN_FILE}"
exit 1
fi
local toc=`echo "$rawhtml" | gh_toc_grab "$gh_src_copy" "$indent"`
echo "$toc"
Expand Down Expand Up @@ -221,41 +221,41 @@ gh_toc_grab() {

href_regex="/href=\"[^\"]+?\"/"
common_awk_script='
modified_href = ""
split(href, chars, "")
for (i=1;i <= length(href); i++) {
c = chars[i]
res = ""
if (c == "+") {
res = " "
} else {
if (c == "%") {
res = "\\x"
} else {
res = c ""
}
}
modified_href = modified_href res
modified_href = ""
split(href, chars, "")
for (i=1;i <= length(href); i++) {
c = chars[i]
res = ""
if (c == "+") {
res = " "
} else {
if (c == "%") {
res = "\\x"
} else {
res = c ""
}
}
modified_href = modified_href res
}
print sprintf("%*s", (level-1)*'"$2"', "") "* [" text "](" gh_url modified_href ")"
'
if [ `uname -s` == "OS/390" ]; then
grepcmd="pcregrep -o"
echoargs=""
awkscript='{
level = substr($0, 3, 1)
text = substr($0, match($0, /<\/span><\/a>[^<]*<\/h/)+11, RLENGTH-14)
href = substr($0, match($0, '$href_regex')+6, RLENGTH-7)
'"$common_awk_script"'
level = substr($0, 3, 1)
text = substr($0, match($0, /<\/span><\/a>[^<]*<\/h/)+11, RLENGTH-14)
href = substr($0, match($0, '$href_regex')+6, RLENGTH-7)
'"$common_awk_script"'
}'
else
grepcmd="grep -Eo"
echoargs="-e"
awkscript='{
level = substr($0, 3, 1)
text = substr($0, match($0, /<\/span><\/a>.*<\/h/)+11, RLENGTH-14)
href = substr($0, match($0, '$href_regex')+6, RLENGTH-7)
'"$common_awk_script"'
level = substr($0, 3, 1)
text = substr($0, match($0, /<\/span><\/a>.*<\/h/)+11, RLENGTH-14)
href = substr($0, match($0, '$href_regex')+6, RLENGTH-7)
'"$common_awk_script"'
}'
fi

Expand Down
2 changes: 1 addition & 1 deletion modules/nf-scil/tracking/pfttracking/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ process TRACKING_PFTTRACKING {
elif [ "${pft_seeding_mask}" == "fa" ]; then
mrcalc $fa $pft_fa_threshold -ge ${prefix}__pft_seeding_mask.nii.gz\
-datatype uint8
-datatype uint8
fi
scil_compute_pft.py $fodf ${prefix}__pft_seeding_mask.nii.gz \
Expand Down
2 changes: 1 addition & 1 deletion modules/nf-scil/utils/extractb0/main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ process UTILS_EXTRACTB0 {
stub:
def args = task.ext.args ?: ''
def prefix = task.ext.prefix ?: "${meta.id}"

"""
scil_extract_b0.py - h
Expand Down

0 comments on commit 7083361

Please sign in to comment.