Socket
Socket
Sign inDemoInstall

bh

Package Overview
Dependencies
0
Maintainers
5
Versions
62
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 4.1.4 to 4.2.0

3

CHANGELOG.md
# Changelog
## 4.2.0
- Added `xhtml` option (#174).
## 4.1.4

@@ -4,0 +7,0 @@ - Fixed tParam reassignment of parent node value (#170).

# История изменений
## 4.2.0
- Добавлена опция `xhtml` (#174).
## 4.1.4

@@ -4,0 +7,0 @@ - Исправлено переопределение в методе tParam (#170).

@@ -63,2 +63,3 @@ var BH = (function() {

this._optDelimMod = '_';
this._optShortTagCloser = '/>';
this.utils = {

@@ -593,2 +594,5 @@ _expandoId: new Date().getTime(),

}
if (options.xhtml === false) {
this._optShortTagCloser = '>';
}
if (options.shortTags) {

@@ -1103,3 +1107,3 @@ for (var j = 0; j < options.shortTags.length; j++) {

if (this._shortTags[tag]) {
this._buf += '/>';
this._buf += this._optShortTagCloser;
} else {

@@ -1106,0 +1110,0 @@ this._buf += '>';

2

package.json

@@ -5,3 +5,3 @@ {

"name": "bh",
"version": "4.1.4",
"version": "4.2.0",
"repository": "https://github.com/bem/bh",

@@ -8,0 +8,0 @@ "licence": "MIT",

@@ -274,2 +274,9 @@ BH [![NPM version](https://badge.fury.io/js/bh.svg)](http://badge.fury.io/js/bh) [![Build Status](https://travis-ci.org/bem/bh.svg?branch=master)](https://travis-ci.org/bem/bh) [![Dependency Status](https://gemnasium.com/bem/bh.svg)](https://gemnasium.com/bem/bh) [![Coverage Status](https://img.shields.io/coveralls/bem/bh.svg?branch=master)](https://coveralls.io/r/bem/bh)

### xhtml
`xhtml` defines wether or not trailing slash should be rendered for short tags. Default value is `true`.
```javascript
bh.setOptions({ xhtml: false });
```
## Additional examples

@@ -276,0 +283,0 @@

@@ -272,2 +272,9 @@ BH [![NPM version](https://badge.fury.io/js/bh.svg)](http://badge.fury.io/js/bh) [![Build Status](https://travis-ci.org/bem/bh.svg?branch=master)](https://travis-ci.org/bem/bh) [![Dependency Status](https://gemnasium.com/bem/bh.svg)](https://gemnasium.com/bem/bh) [![Coverage Status](https://img.shields.io/coveralls/bem/bh.svg?branch=master)](https://coveralls.io/r/bem/bh)

### xhtml
`xhtml` определяет, нужно ли рендерить слеш для коротких тегов. По умолчанию `true`.
```javascript
bh.setOptions({ xhtml: false });
```
## Дополнительные примеры

@@ -274,0 +281,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc