mirror of
https://codeberg.org/scip/epuppy.git
synced 2025-12-17 04:20:59 +01:00
add line number support and support for text files
This commit is contained in:
@@ -1,18 +1,5 @@
|
||||
package epub
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
)
|
||||
|
||||
var (
|
||||
cleantitle = regexp.MustCompile(`(?s)<head>.*</head>`)
|
||||
cleanmarkup = regexp.MustCompile(`<[^<>]+>`)
|
||||
cleanentities = regexp.MustCompile(`&.+;`)
|
||||
cleancomments = regexp.MustCompile(`/*.*/`)
|
||||
cleanspace = regexp.MustCompile(`^\s*`)
|
||||
cleanh1 = regexp.MustCompile(`<h[1-6].*</h[1-6]>`)
|
||||
)
|
||||
|
||||
// Ncx OPS/toc.ncx
|
||||
type Ncx struct {
|
||||
Points []*NavPoint `xml:"navMap>navPoint" json:"points"`
|
||||
|
||||
Reference in New Issue
Block a user