mirror of
https://github.com/NohamR/papeer.git
synced 2026-05-26 04:17:21 +00:00
fix tests, fix hidden images, remove source label under title
This commit is contained in:
@@ -32,7 +32,7 @@ func ToMarkdownString(c chapter) string {
|
||||
|
||||
// url
|
||||
if c.config.PrintURL {
|
||||
markdown += fmt.Sprintf("_Source: %s_\n\n", c.URL())
|
||||
markdown += fmt.Sprintf("_%s_\n\n", c.URL())
|
||||
}
|
||||
|
||||
// convert content to markdown
|
||||
@@ -82,7 +82,7 @@ func ToHtmlString(c chapter) string {
|
||||
|
||||
// url
|
||||
if c.config.PrintURL {
|
||||
html += fmt.Sprintf("<p><i>Source: %s</i></p>\n", c.URL())
|
||||
html += fmt.Sprintf("<p><i>%s</i></p>\n", c.URL())
|
||||
}
|
||||
|
||||
// content
|
||||
@@ -177,9 +177,9 @@ func AppendToEpub(e *epub.Epub, c chapter) {
|
||||
|
||||
if c.config.ImagesOnly {
|
||||
imageTag, _ := goquery.OuterHtml(s)
|
||||
content += strings.Replace(imageTag, src, imagePath, 1)
|
||||
content += strings.ReplaceAll(imageTag, src, imagePath)
|
||||
} else {
|
||||
content = strings.Replace(content, src, imagePath, 1)
|
||||
content = strings.ReplaceAll(content, src, imagePath)
|
||||
}
|
||||
})
|
||||
|
||||
@@ -191,7 +191,7 @@ func AppendToEpub(e *epub.Epub, c chapter) {
|
||||
|
||||
// url
|
||||
if c.config.PrintURL {
|
||||
html += fmt.Sprintf("<p><i>Source: %s</i></p>\n", c.URL())
|
||||
html += fmt.Sprintf("<p><i>%s</i></p>\n", c.URL())
|
||||
}
|
||||
|
||||
// content
|
||||
|
||||
Reference in New Issue
Block a user