Initial commit, 90% there
This commit is contained in:
24
node_modules/command-line-usage/lib/content-section.js
generated
vendored
Normal file
24
node_modules/command-line-usage/lib/content-section.js
generated
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
'use strict'
|
||||
const Section = require('./section')
|
||||
const Content = require('./content')
|
||||
|
||||
class ContentSection extends Section {
|
||||
constructor (section) {
|
||||
super()
|
||||
this.header(section.header)
|
||||
|
||||
if (section.content) {
|
||||
/* add content without indentation or wrapping */
|
||||
if (section.raw) {
|
||||
this.add(section.content)
|
||||
} else {
|
||||
const content = new Content(section.content)
|
||||
this.add(content.lines())
|
||||
}
|
||||
|
||||
this.emptyLine()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = ContentSection
|
||||
Reference in New Issue
Block a user