ext

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2021 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

BSD 3-Clause License

Copyright (c) 2019, Michael McLoughlin All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  1. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  1. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Index

Constants

This section is empty.

Variables

View Source
var AsciiTable = &asciiTable{}

AsciiTable is a extension for Goldmark that wraps Markdown tables in code blocks.

View Source
var Footnote = &footnote{
	options: []extension.FootnoteOption{},
}

Footnote is an extension that allow you to use PHP Markdown Extra Footnotes.

View Source
var Math2Img = &math2Img{}

Math2Image is a extension for Goldmark that converts block-style (`$$ ... $$`) math equations into an image sutiable for platforms without math typesetting support.

View Source
var Math2Unicode = &math2Unicode{}

Math2Unicode is a extension for Goldmark that converts inline-style (`$ ... $`) math equations into their unicode-equivalent characters for use on platform without math typesetting support.

View Source
var NamedP = &namedP{}

NamedP is an extension that assigns each paragraph a unique `name=` ID.

Functions

func FromLocalToMedium

func FromLocalToMedium(src string) string

FromLocalToMedium uploads a local file to Medium.

func NewFootnote

func NewFootnote(opts ...extension.FootnoteOption) goldmark.Extender

NewFootnote returns a new extension with given options.

func NewMath2Img

func NewMath2Img(opts ...MathOption) goldmark.Extender

New returns a new Math2Img extension.

Types

type MathOption

type MathOption func(*math2Img)

MathOption is a functional option type for this extension.

func WithConvertToPNG

func WithConvertToPNG() MathOption

WithConvertToPNG is a functional option that instructs Math2Image to perform a local conversion from SVG to PNG using InkScape.

This is required for certain platforms -- such as Medium -- that don't support SVGs.

Jump to

Keyboard shortcuts

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