Last change
on this file since ceaed42 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
542 bytes
|
Line | |
---|
1 | var utils = require('../utils');
|
---|
2 |
|
---|
3 | /**
|
---|
4 | * Prefix css classes in a block
|
---|
5 | *
|
---|
6 | * @param {String} prefix
|
---|
7 | * @param {Block} block
|
---|
8 | * @return {Block}
|
---|
9 | * @api private
|
---|
10 | */
|
---|
11 |
|
---|
12 | function prefixClasses(prefix, block){
|
---|
13 | utils.assertString(prefix, 'prefix');
|
---|
14 | utils.assertType(block, 'block', 'block');
|
---|
15 |
|
---|
16 | var _prefix = this.prefix;
|
---|
17 |
|
---|
18 | this.options.prefix = this.prefix = prefix.string;
|
---|
19 | block = this.visit(block);
|
---|
20 | this.options.prefix = this.prefix = _prefix;
|
---|
21 | return block;
|
---|
22 | }
|
---|
23 | prefixClasses.params = ['prefix', 'block'];
|
---|
24 | module.exports = prefixClasses;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.