md

package
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Readme

Package md is used to extract the text in code segments of a markdown file.

Code segments are enclosed in triple backticks: "```", eg:

A : B b | c ;

md.GetSource(input string) string returns a string with the same number of bytes as the input with:

  • All characters inside code segments preserved in place;
  • All space characters (' ', '\n', '\r', '\t') outside code segments preserved in place;
  • All non-space characters outside code segments replace by ' ' (space).
  • The enclosing backticks of code segments replaced with spaces, i.e.: "```" replaced with " ".

Documentation

Overview

Package md extracts code sections of markdown files

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetSource

func GetSource(mdfile string) (string, error)

GetSource returns code sections enclosed in triple backticks.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL