Skip to content

Commit 8136c21

Browse files
committed
build
1 parent 57b8d0c commit 8136c21

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

umd/index.cjs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2218,16 +2218,15 @@
22182218
param = param.replace(/^\*{1,2}/g, '');
22192219

22202220
// Check if a default value is provided (= or := syntax)
2221-
if (param.includes('=')) {
2222-
const [name, def] = param.split('=');
2221+
if (/:?=/.test(param)) {
2222+
const [name, def] = param.split(/:?=/);
22232223

22242224
// TODO: Support caret and default syntax
22252225
if (/^\^/.test(def) || /\|/.test(def)) {
22262226
throw new Error(`XacroParser: ROS Jade pass-through notation not supported in macro defaults: ${ def }`);
22272227
}
22282228

2229-
// Support := default values by dropping the ':' from `name`
2230-
obj.name = name.replace(/:$/, '');
2229+
obj.name = name;
22312230

22322231
if (def.startsWith('\'') && def.endsWith('\'')) {
22332232
// strip quotes from the default value if it happens to be a string like so:

umd/index.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)