Skip to content

Commit

Permalink
alow using attributes in color xml tags #924
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Apr 20, 2024
1 parent b90b736 commit 216dee9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
@@ -1,6 +1,7 @@
## 2.40.0
### Features
* Don't force any attributes when using xml (`span`, `img`, and `a` tags) [#913](https://github.com/jcubic/jquery.terminal/issues/913)
* don't force any attributes when using xml (`span`, `img`, and `a` tags) [#913](https://github.com/jcubic/jquery.terminal/issues/913)
* alow using attributes in color xml tags [#924](https://github.com/jcubic/jquery.terminal/issues/924)
### Bugfix
* fix init and resize of long prompt [#919](https://github.com/jcubic/jquery.terminal/issues/919)
* fix occasional selecting Accessibility label (about clipboard textarea) in CMD
Expand Down
4 changes: 3 additions & 1 deletion js/xml_formatting.js
Expand Up @@ -145,7 +145,9 @@
if (tags[name]) {
return tags[name](attrs);
} else {
return '[[;' + name + ';]';
var cls = attrs.class || '';
var formatting = ['', name, '', cls, '', JSON.stringify(attrs)];
return '[[' + formatting.join(';') + ']';
}
}
return string.replace(/&lt;/g, '<').replace(/&gt;/g, '>');
Expand Down

0 comments on commit 216dee9

Please sign in to comment.