mirror of
https://github.com/tests-always-included/mo.git
synced 2024-12-18 16:27:52 +00:00
parent
6e57510ba9
commit
26ca5059d8
@ -121,7 +121,7 @@ Please note that this command is written in Bash and pulls data from either the
|
|||||||
|
|
||||||
|
|
||||||
Enhancements
|
Enhancements
|
||||||
-----------
|
------------
|
||||||
|
|
||||||
In addition to many of the features built-in to Mustache, `mo` includes a number of unique features that make it a bit more powerful.
|
In addition to many of the features built-in to Mustache, `mo` includes a number of unique features that make it a bit more powerful.
|
||||||
|
|
||||||
|
28
mo
28
mo
@ -430,19 +430,29 @@ mo::indirectArray() {
|
|||||||
#
|
#
|
||||||
# Returns nothing.
|
# Returns nothing.
|
||||||
mo::trimUnparsed() {
|
mo::trimUnparsed() {
|
||||||
local moLast moR moN moT
|
local moLastLen moR moN moT
|
||||||
|
|
||||||
moLast=""
|
moLastLen=0
|
||||||
moR=$'\r'
|
moR=$'\r'
|
||||||
moN=$'\n'
|
moN=$'\n'
|
||||||
moT=$'\t'
|
moT=$'\t'
|
||||||
|
|
||||||
while [[ "$MO_UNPARSED" != "$moLast" ]]; do
|
while [[ "${#MO_UNPARSED}" != "$moLastLen" ]]; do
|
||||||
moLast=$MO_UNPARSED
|
moLastLen=${#MO_UNPARSED}
|
||||||
MO_UNPARSED=${MO_UNPARSED# }
|
|
||||||
MO_UNPARSED=${MO_UNPARSED#"$moR"}
|
# These conditions are necessary for a significant speed increase
|
||||||
MO_UNPARSED=${MO_UNPARSED#"$moN"}
|
while [[ "${MO_UNPARSED:0:1}" == " " ]]; do
|
||||||
MO_UNPARSED=${MO_UNPARSED#"$moT"}
|
MO_UNPARSED=${MO_UNPARSED# }
|
||||||
|
done
|
||||||
|
while [[ "${MO_UNPARSED:0:1}" == "$moR" ]]; do
|
||||||
|
MO_UNPARSED=${MO_UNPARSED#"$moR"}
|
||||||
|
done
|
||||||
|
while [[ "${MO_UNPARSED:0:1}" == "$moN" ]]; do
|
||||||
|
MO_UNPARSED=${MO_UNPARSED#"$moN"}
|
||||||
|
done
|
||||||
|
while [[ "${MO_UNPARSED:0:1}" == "$moT" ]]; do
|
||||||
|
MO_UNPARSED=${MO_UNPARSED#"$moT"}
|
||||||
|
done
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1950,7 +1960,7 @@ mo::tokenizeTagContentsSingleQuote() {
|
|||||||
|
|
||||||
# Save the original command's path for usage later
|
# Save the original command's path for usage later
|
||||||
MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}"
|
MO_ORIGINAL_COMMAND="$(cd "${BASH_SOURCE[0]%/*}" || exit 1; pwd)/${BASH_SOURCE[0]##*/}"
|
||||||
MO_VERSION="3.0.4"
|
MO_VERSION="3.0.5"
|
||||||
|
|
||||||
# If sourced, load all functions.
|
# If sourced, load all functions.
|
||||||
# If executed, perform the actions as expected.
|
# If executed, perform the actions as expected.
|
||||||
|
@ -94,7 +94,7 @@ This is open source! Please feel free to contribute.
|
|||||||
|
|
||||||
https://github.com/tests-always-included/mo
|
https://github.com/tests-always-included/mo
|
||||||
|
|
||||||
MO_VERSION=3.0.4
|
MO_VERSION=3.0.5
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user