html2jsx

package module
v0.0.0-...-67016c8 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2021 License: MIT Imports: 6 Imported by: 0

README

html2jsx

A simple html to jsx sanitizer / converter, mainly to convert tailwind UI components to JSX-valid markup.

Documentation

Index

Constants

View Source
const StartTag, EndTag, Slash, Equals, Space, Quote = '<', '>', '/', '=', ' ', '"'

Variables

View Source
var CouldNotConvertErr = errors.New("could not convert html")
View Source
var CouldNotParseErr = errors.New("could not parse html")
View Source
var ErrorMultipleHyphens = errors.New("multiple hypens in attribute name detected")

Functions

func Convert

func Convert(r io.Reader, w io.Writer) error

Types

type Attribute

type Attribute struct {
	Key, Value string
}

Jump to

Keyboard shortcuts

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