@gravityforms/gulp-tasks
Version:
Configurable Gulp tasks for use in Gravity Forms projects.
30 lines (22 loc) • 552 B
JavaScript
import { Token } from './token.js';
class cssExample extends Token {
typeText = 'cssexample';
endCondition( _line, prevLine ) {
if ( prevLine.trim() === '}' ) {
return true;
}
return false;
}
tokenCondition( text ) {
if ( text.indexOf( 'cssexample' ) !== -1 ) {
return true;
}
return false;
}
getContent() {
let content = this.lines.join( '\n' ).trim();
content = content.replace( '@cssexample\n', '' );
return `<pre class="prettyprint source lang-css"><code>${ content }</code></pre>`;
}
}
export { cssExample };