Commit Graph
38 Commits
Author SHA1 Message Date
Christian Muehlhaeuser f47f525238 Handle renderer errors 2019-11-26 03:58:33 +01:00
Christian Muehlhaeuser 8f083a1043 Clean up pre/post ambiguity 2019-11-26 03:55:43 +01:00
Christian Muehlhaeuser c0d32b4fcb Abort on rendering error 2019-11-26 03:33:02 +01:00
Christian Muehlhaeuser 24a6306e1a Use a Renderer interface instead of rendering fragments 2019-11-26 03:24:56 +01:00
Christian Muehlhaeuser d438c26548 Correctly render nested lists 2019-11-26 01:20:59 +01:00
Christian Muehlhaeuser 18e173b10d Handle relative URLs in markdown, when a BaseURL is provided 2019-11-26 00:35:11 +01:00
Christian Muehlhaeuser c2af06bed0 Fix word-wrapping in colored output 2019-11-25 10:04:55 +01:00
Christian Muehlhaeuser 4de0a10e9e Disable syntax highlighting when output is no terminal 2019-11-25 07:58:13 +01:00
Christian Muehlhaeuser ef9ee10b74 Unescape sanitized HTML 2019-11-25 07:28:58 +01:00
Christian Muehlhaeuser 66d599db99 HTML-sanitize all text elements 2019-11-25 07:16:22 +01:00
Christian Muehlhaeuser fb7c07f593 Strip HTML tags and render plain-text content only 2019-11-25 06:45:55 +01:00
Christian Muehlhaeuser 4c529d72b9 Word-wrap text at 100 chars per default
The default can be overwritten by the user:

./gold -w 80
2019-11-25 06:44:10 +01:00
Christian Muehlhaeuser 937e525993 Let user pick a syntax color theme in Gold's style config 2019-11-25 06:02:50 +01:00
Christian Muehlhaeuser e6a9122041 Enable code highlighting with chroma 2019-11-25 05:47:14 +01:00
Christian Muehlhaeuser 16c2b7a239 Move style handling to style.go 2019-11-25 05:19:47 +01:00
Christian Muehlhaeuser cc6e73b598 Link to cmd/gold instead of main.go 2019-11-25 05:00:01 +01:00
Christian Muehlhaeuser 450c551f08 Use a plain-text renderer when not printing to Terminal 2019-11-25 04:32:24 +01:00
Christian Muehlhaeuser 6eb2d04812 Handle nested content inside links 2019-11-25 02:40:34 +01:00
Christian Muehlhaeuser d082cb2124 Use ElementStyles to determine rendering style
Since BlackFriday's Nodes are limiting us a bit in rendering
flexibility, I've introduced Gold's own ElementStyles (a bit of
code repetition here, but alas).

Nodes can now be divided into multiple fragments, which means we
are able to display the link's URL and text in different styles.

Updated the dark theme to demo the newly gained flexibility.
2019-11-24 23:33:25 +01:00
Toby Padilla 13d43240dc Move Render and RenderBytes to TermRenderer 2019-11-24 13:35:01 -06:00
Christian Muehlhaeuser f119aef232 Fix new-line before first paragraph 2019-11-24 05:09:07 +01:00
Christian Muehlhaeuser 5191ed1f9c Fix line-break before list items 2019-11-24 04:44:12 +01:00
Christian Muehlhaeuser 9a3c403d78 Fix markdown rendering for first and last paragraphs 2019-11-24 04:20:35 +01:00
Christian Muehlhaeuser 9d157bad5c Fix line-break issues in markdown rendering
Fixes #3.
2019-11-24 04:08:54 +01:00
Christian Muehlhaeuser e6323d45df Fix rendering of list items 2019-11-24 03:51:30 +01:00
Christian Muehlhaeuser 8209d80f27 Add goreleaser config to help automate builds for various platforms
We're currently building the following targets:
- Linux 386/x64/armv6/arm64
- Windows 386/x64
- macOS x64
2019-11-24 02:39:02 +01:00
Christian Muehlhaeuser 9b17f91d28 Use cobra to handle command line parameters 2019-11-22 18:47:42 +01:00
Toby Padilla 995fdcc93f Link to main.go 2019-11-15 12:28:33 -06:00
Toby Padilla c52e92c122 README and LICENSE 2019-11-15 12:27:41 -06:00
Toby Padilla 835820cc49 Update repo org 2019-11-15 12:02:39 -06:00
Toby Padilla 30c76f2ca8 Remove redundant else 2019-11-15 12:01:12 -06:00
Toby Padilla a8390a1637 Move important stuff up top 2019-11-12 16:39:26 -05:00
Toby Padilla 8f16561ac5 Remove blackfriday requirement from clients 2019-11-12 16:36:51 -05:00
Toby Padilla 8300cb7a55 Fix child element rendering 2019-11-12 15:53:11 -05:00
Toby Padilla 8838557f20 Remove old consts 2019-11-09 16:29:04 -06:00
Toby Padilla 9fcd9c09da Much better parsing, README example 2019-11-09 16:12:54 -06:00
Toby Padilla 007bc18b9a Load style from json 2019-11-09 14:07:01 -06:00
Toby Padilla 86bed674ac init 2019-11-04 17:35:50 -06:00