75lb / command-line-usage

A simple, data-driven module for creating a usage guide.
MIT License
208 stars 36 forks source link

unwanted deletion of leading blanks #28

Closed CarpeDiemKopi closed 5 years ago

CarpeDiemKopi commented 5 years ago
const sections = [
  {
    header: 'web2js: compile.js, initex.js, tex.js',
    content: 'Generate WebAssembly {bold JSTEs} (JavaScript Typesetting Engines) and core.dump'
  },

  {
    header:  'Untitled Arguments, Example',
    content: 'JSTE, fmt         node.exe JS/web2js/compile.js eTeX 01`' + 
           '\n-                 => JSTE = eTeX' +
           '\n-                 => fmt  = 01' +      
           '\n-                 node.exe ../JS/web2js/compile.js 01`' + 
           '\n-                 => JSTE:  derived from directory name' +
           '\n-                 => fmt  = 01' +                
           '\n-                 node.exe ../../JS/web2js/compile.js`' + 
           '\n-                 => JSTE:  derived from directory name' +
           '\n-                 => fmt:   derived from directory name'                  
  },

I want to code '\n...' without the minus sign but then everything moves to the left.

How can I get a layout as follows?


  JSTE, fmt         node.exe JS/web2js/compile.js eTeX 01`
                    => JSTE = eTeX
                    => fmt  = 01
                    node.exe ../JS/web2js/compile.js 01`
                    => JSTE:  derived from directory name
                    => fmt  = 01
                    node.exe ../../JS/web2js/compile.js`
                    => JSTE:  derived from directory name
                    => fmt:   derived from directory name
75lb commented 5 years ago

Read this wiki page

CarpeDiemKopi commented 5 years ago

Your package is amazing.

Suggestion: Add another content to the first example in your readme.md which shows this technique and the white space link too.