We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
expand
1 parent 5b2e13c commit eb01457Copy full SHA for eb01457
1 file changed
bin/jsonld.js
@@ -208,10 +208,6 @@ function _jsonLdOptions(command, input) {
208
options.safe = true;
209
}
210
211
- if(command.context) {
212
- options.expandContext = command.context;
213
- }
214
-
215
options.base = _getBase(command, input);
216
217
// setup documentLoader
@@ -339,6 +335,10 @@ _jsonLdCommand(program.command('expand [filename|URL|-]'))
339
335
.option(' --keep-free-floating-nodes', 'keep free-floating nodes')
340
336
.action(async function expand(input, cmd) {
341
337
input = input || '-';
338
+ if(cmd.context) {
+ cmd.expandContext = cmd.context;
+ delete cmd.context;
+ }
342
const options = _jsonLdOptions(cmd, input);
343
options.keepFreeFloatingNodes = cmd.keepFreeFloatingNodes;
344
0 commit comments