Skip to content

Markdown Functions

🛠️ Tools · ⬅ Home


Arguments

  • None

Examples

markdownRemoveUnfinishedSections < inputFile > outputFile
map.sh < $templateFile | markdownRemoveUnfinishedSections

Return codes

  • 0

Environment

  • None

Usage

markdownFormatList

Simple function to make list-like things more list-like in Markdown 1. Remove all trailing spaces from all lines 2. remove leading "dash space" if it exists (-) 3. Semantically, if the phrase matches [word]+[space][dash][space]. backtick quote the [word], otherwise skip 4. Prefix each line with a "dash space" (-)

Reads standard input

reads input from stdin

Writes to standard output

formatted markdown list

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

markdownIndentHeading

Add an indent to all markdown headings

Arguments

  • none

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

markdownToConsole [ --help ]

Converts backticks, bold and italic to console colors.

Reads standard input

Markdown

Writes to standard output

decorated console output

Arguments

  • --help - Flag. Optional. Display this help.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error

Usage

markdownCheckIndex indexFile ... [ --help ] [ --handler handler ]

Displays any markdown files next to the given index file which are not found within the index file as links.

Arguments

  • indexFile ... - File. Required. One or more index files to check.
  • --help - Flag. Optional. Display this help.
  • --handler handler - Function. Optional. Use this error handler instead of the default error handler.

Return codes

  • 0 - Success
  • 1 - Environment error
  • 2 - Argument error