Skip to content

Commit

Permalink
Updated plugman pluginHandlers to support framework link attribute. U…
Browse files Browse the repository at this point in the history
…pdate is backwards compatible with previous embed behaviour.
  • Loading branch information
TylerBreau committed Jan 23, 2023
1 parent dba1704 commit 02255a2
Show file tree
Hide file tree
Showing 7 changed files with 654 additions and 1,884 deletions.
8 changes: 7 additions & 1 deletion lib/plugman/pluginHandlers.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,13 @@ const handlers = {
const src = obj.src;
const custom = !!(obj.custom); // convert to boolean (if truthy/falsy)
const embed = !!(obj.embed); // convert to boolean (if truthy/falsy)
const link = !embed; // either link or embed can be true, but not both. the other has to be false
let link;
// If obj.link is not explicitly set, default to pre-link attribute behaviour
if (obj.link === null || obj.link === undefined) {
link = !embed;
} else {
link = String(obj.link).toLowerCase() === 'true';
}

if (!custom) {
const keepFrameworks = keep_these_frameworks;
Expand Down
Loading

0 comments on commit 02255a2

Please sign in to comment.