Skip to content

Commit

Permalink
Use consistent formatting for "alternative" comments in helpers.
Browse files Browse the repository at this point in the history
  • Loading branch information
xwmx committed Oct 22, 2020
1 parent a4f5533 commit c46f605
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nb
Original file line number Diff line number Diff line change
Expand Up @@ -1569,8 +1569,8 @@ _get_first_line() {
if _file_is_text "${_path}"
then

# Alternative
# -----------
# `awk` alternative
# -----------------
# awk -f - "${_path}" <<'HEREDOC'
# (state == 0) && /^---$/ { state=1; next }
# (state == 1) && /^---$/ { state=0; next }
Expand Down Expand Up @@ -1738,7 +1738,8 @@ _get_title() {
_title="${_title%${BASH_REMATCH[1]}}"
fi

# `sed` alternative:
# `sed` alternative
# -----------------
# _title="$(
# printf "%s\\n" "${__line}" \
# | sed \
Expand Down

0 comments on commit c46f605

Please sign in to comment.