Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const fs = require('fs');
- const path = require('path');
- const wrapperHtml = '<p style="text-align: center"> </p>';
- const contentHtml = '<details style="border: 1px solid blue; WIDTH: 20em"><summary>Test</summary>The quick brown fox jumps over the lazy dog</details>';
- const tags = [
- //Inline tags
- 'a',
- 'abbr',
- 'acronym',
- 'b',
- 'bdo',
- 'big',
- 'br',
- 'button',
- 'cite',
- 'code',
- 'dfn',
- 'em',
- 'i',
- 'img',
- 'input',
- 'kbd',
- 'label',
- 'map',
- 'object',
- 'q',
- 'samp',
- 'script',
- 'select',
- 'small',
- 'span',
- 'strong',
- 'sub',
- 'sup',
- 'textarea',
- 'time',
- 'tt',
- 'var',
- //Block-level tags
- 'address',
- 'article',
- 'aside',
- 'blockquote',
- 'canvas',
- 'dd',
- 'div',
- 'dl',
- 'dt',
- 'fieldset',
- 'figcaption',
- 'figure',
- 'footer',
- 'form',
- 'h1',
- 'h2',
- 'h3',
- 'h4',
- 'h5',
- 'h6',
- 'header',
- 'hgroup',
- 'hr',
- 'li',
- 'main',
- 'nav',
- 'noscript',
- 'ol',
- 'output',
- 'p',
- 'pre',
- 'section',
- 'table',
- 'tfoot',
- 'ul',
- 'video'
- ];
- const outputFile = path.join(__dirname, 'test-source.html');
- let outputStr = '';
- for (const tag of tags) {
- outputStr +=
- `<p style="text-align: center">Test tag: [${tag}]<br>\n <${tag} style="display: inline; border: 1px solid red">${contentHtml}</${tag}>\nEnd of test for [${tag}] tag</p>\n\n`;
- }
- fs.writeFileSync(outputFile, outputStr);
Add Comment
Please, Sign In to add comment