From ea285ca64f6ea5c179861581b01433902ecd1fd1 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Mon, 6 Sep 2021 10:43:22 -0600 Subject: [PATCH] Bump reflow to v0.3.0 reflow v0.3.0 no longer outputs duplicate `ESC[0m` sequences, hence the testdata needed to be regenerated. --- go.mod | 2 +- go.sum | 6 +++++ testdata/block_quote.test | 4 +-- testdata/code.test | 2 +- testdata/emph.test | 2 +- testdata/enumeration.test | 4 +-- testdata/heading.test | 6 ++--- testdata/image.test | 2 +- testdata/issues/42.test | 8 +++--- testdata/issues/43.test | 14 +++++----- testdata/issues/46_1.test | 6 ++--- testdata/issues/47.test | 2 +- testdata/issues/48.test | 24 ++++++++--------- testdata/link.test | 2 +- testdata/list.test | 6 ++--- testdata/readme.test | 52 ++++++++++++++++++------------------- testdata/strikethrough.test | 2 +- testdata/strong.test | 2 +- testdata/task.test | 4 +-- 19 files changed, 78 insertions(+), 72 deletions(-) diff --git a/go.mod b/go.mod index 4935c04..cec44aa 100644 --- a/go.mod +++ b/go.mod @@ -5,7 +5,7 @@ go 1.13 require ( github.com/alecthomas/chroma v0.8.2 github.com/microcosm-cc/bluemonday v1.0.6 - github.com/muesli/reflow v0.2.0 + github.com/muesli/reflow v0.3.0 github.com/muesli/termenv v0.8.1 github.com/olekukonko/tablewriter v0.0.5 github.com/yuin/goldmark v1.3.3 diff --git a/go.sum b/go.sum index 6169d59..03f716a 100644 --- a/go.sum +++ b/go.sum @@ -26,10 +26,14 @@ github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Ky github.com/mattn/go-runewidth v0.0.9/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI= github.com/mattn/go-runewidth v0.0.10 h1:CoZ3S2P7pvtP45xOtBw+/mDL2z0RKI576gSkzRRpdGg= github.com/mattn/go-runewidth v0.0.10/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= +github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow= +github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk= github.com/microcosm-cc/bluemonday v1.0.6 h1:ZOvqHKtnx0fUpnbQm3m3zKFWE+DRC+XB1onh8JoEObE= github.com/microcosm-cc/bluemonday v1.0.6/go.mod h1:HOT/6NaBlR0f9XlxD3zolN6Z3N8Lp4pvhp+jLS5ihnI= github.com/muesli/reflow v0.2.0 h1:2o0UBJPHHH4fa2GCXU4Rg4DwOtWPMekCeyc5EWbAQp0= github.com/muesli/reflow v0.2.0/go.mod h1:qT22vjVmM9MIUeLgsVYe/Ye7eZlbv9dZjL3dVhUqLX8= +github.com/muesli/reflow v0.3.0 h1:IFsN6K9NfGtjeggFP+68I4chLZV2yIKsXJFNZ+eWh6s= +github.com/muesli/reflow v0.3.0/go.mod h1:pbwTDkVPibjO2kyvBQRBxTWEEGDGq0FlB1BIKtnHY/8= github.com/muesli/termenv v0.8.1 h1:9q230czSP3DHVpkaPDXGp0TOfAwyjyYwXlUCQxQSaBk= github.com/muesli/termenv v0.8.1/go.mod h1:kzt/D/4a88RoheZmwfqorY3A+tnsSMA9HJC/fQSFKo0= github.com/olekukonko/tablewriter v0.0.5 h1:P2Ga83D34wi1o9J6Wh1mRuqd4mF/x/lgBS7N7AbDhec= @@ -40,6 +44,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.1.0 h1:+2KBaVoUmb9XzDsrx/Ct0W/EYOSFf/nWTauy++DprtY= github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= +github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= github.com/sergi/go-diff v1.0.0 h1:Kpca3qRNrduNnOQeazBd0ysaKrUJiIuISHxogkT9RPQ= github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= diff --git a/testdata/block_quote.test b/testdata/block_quote.test index 0f895d3..57dbd96 100644 --- a/testdata/block_quote.test +++ b/testdata/block_quote.test @@ -1,3 +1,3 @@ -=> First line of quote                                                             -=> Second line                                                                     +=> First line of quote                                                             +=> Second line                                                                     diff --git a/testdata/code.test b/testdata/code.test index 32bb783..ba6f5d3 100644 --- a/testdata/code.test +++ b/testdata/code.test @@ -1 +1 @@ -This is a code.  +This is a code. diff --git a/testdata/emph.test b/testdata/emph.test index db5ee2f..2d96398 100644 --- a/testdata/emph.test +++ b/testdata/emph.test @@ -1 +1 @@ -This text is emphasized.  +This text is emphasized. diff --git a/testdata/enumeration.test b/testdata/enumeration.test index 2eb6345..13e62fc 100644 --- a/testdata/enumeration.test +++ b/testdata/enumeration.test @@ -1,3 +1,3 @@ -1. First Item                                                                    -2. Second Item                                                                   +1. First Item                                                                    +2. Second Item                                                                   diff --git a/testdata/heading.test b/testdata/heading.test index a87d8ef..b29a7e2 100644 --- a/testdata/heading.test +++ b/testdata/heading.test @@ -1,3 +1,3 @@ - => h1 <=  - ## h2  - ### h3 \ No newline at end of file + => h1 <= + ## h2 + ### h3 \ No newline at end of file diff --git a/testdata/image.test b/testdata/image.test index bce276f..e4ea8ac 100644 --- a/testdata/image.test +++ b/testdata/image.test @@ -1 +1 @@ -Image [Image: https://charm.sh/logo.png].  +Image [Image: https://charm.sh/logo.png]. diff --git a/testdata/issues/42.test b/testdata/issues/42.test index c3539cd..09f61ff 100644 --- a/testdata/issues/42.test +++ b/testdata/issues/42.test @@ -1,6 +1,6 @@ - If you want to make a more significant change, please first open an issue    - https://github.com/twpayne/chezmoi/issues/new to discuss the change that you - want to make. Dave Cheney gives a good rationale                             - https://dave.cheney.net/2019/02/18/talk-then-code as to why this is important. + If you want to make a more significant change, please first open an issue    + https://github.com/twpayne/chezmoi/issues/new to discuss the change that you + want to make. Dave Cheney gives a good rationale                             + https://dave.cheney.net/2019/02/18/talk-then-code as to why this is important. diff --git a/testdata/issues/43.test b/testdata/issues/43.test index 4428d7d..f88488f 100644 --- a/testdata/issues/43.test +++ b/testdata/issues/43.test @@ -1,10 +1,10 @@                                                                              - • Getting started                                                            - • Developing locally                                                         - • Documentation changes                                                      - • Contributing changes                                                       - • Managing releases                                                          - • Packaging                                                                  - • Updating the website                                                       + • Getting started                                                            + • Developing locally                                                         + • Documentation changes                                                      + • Contributing changes                                                       + • Managing releases                                                          + • Packaging                                                                  + • Updating the website                                                       diff --git a/testdata/issues/46_1.test b/testdata/issues/46_1.test index 1e69f5c..0eb404e 100644 --- a/testdata/issues/46_1.test +++ b/testdata/issues/46_1.test @@ -1,6 +1,6 @@                                                                              - • Navigation                                                                 -   • Familiar shortcuts (arrows, ~, -, @), quick reference                    -                                                                              + • Navigation                                                                 +   • Familiar shortcuts (arrows, ~, -, @), quick reference                    +                                                                              diff --git a/testdata/issues/47.test b/testdata/issues/47.test index 7556767..581f110 100644 --- a/testdata/issues/47.test +++ b/testdata/issues/47.test @@ -1,3 +1,3 @@ - Example:                                                     + Example:                                                     diff --git a/testdata/issues/48.test b/testdata/issues/48.test index 9c22602..4673d85 100644 --- a/testdata/issues/48.test +++ b/testdata/issues/48.test @@ -1,17 +1,17 @@ - emoji in text                                                                -                                                                              - 🐙 ⚡ 🐱 = ❤️                                                                -                                                                              - emoji in header                                                              + emoji in text                                                                +                                                                              + 🐙 ⚡ 🐱 = ❤️                                                                +                                                                              + emoji in header                                                                                                                                             ## 🐙 ⚡ 🐱 = ❤️                                                             -                                                                              - no emoji in code blocks                                                      -                                                                              +                                                                              + no emoji in code blocks                                                      +                                                                                 :octopus: :zap: :cat: = :heart:                                            -                                                                              - no emoji in inline code                                                      -                                                                              -  :octopus: :zap: :cat: = :heart:                                             +                                                                              + no emoji in inline code                                                      +                                                                              +  :octopus: :zap: :cat: = :heart:                                             diff --git a/testdata/link.test b/testdata/link.test index b532547..ed11bdb 100644 --- a/testdata/link.test +++ b/testdata/link.test @@ -1 +1 @@ -This is a link (https://charm.sh).  +This is a link (https://charm.sh). diff --git a/testdata/list.test b/testdata/list.test index 806f39c..4ba92dc 100644 --- a/testdata/list.test +++ b/testdata/list.test @@ -1,4 +1,4 @@ -• First Item                                                                     -    • Nested List Item                                                           -• Second Item                                                                    +• First Item                                                                     +    • Nested List Item                                                           +• Second Item                                                                    diff --git a/testdata/readme.test b/testdata/readme.test index 356f124..f9f36d2 100644 --- a/testdata/readme.test +++ b/testdata/readme.test @@ -1,40 +1,40 @@   Gold                                                                        -                                                                              - Render markdown on the CLI, with pizzazz!                                    +                                                                              + Render markdown on the CLI, with pizzazz!                                                                                                                   ## What is it?                                                               -                                                                              - Gold is a Golang library that allows you to use JSON based stylesheets to    - render Markdown files in the terminal. Just like CSS, you can define color   - and style attributes on Markdown elements. The difference is that you use    - ANSI color and terminal codes instead of CSS properties and hex colors.      +                                                                              + Gold is a Golang library that allows you to use JSON based stylesheets to    + render Markdown files in the terminal. Just like CSS, you can define color   + and style attributes on Markdown elements. The difference is that you use    + ANSI color and terminal codes instead of CSS properties and hex colors.                                                                                     ## Usage                                                                     -                                                                              - See cmd/gold /cmd/gold/.                                                     +                                                                              + See cmd/gold /cmd/gold/.                                                                                                                                    ## Example Output                                                            -                                                                              - Image: Gold Dark Style →                                                     - https://github.com/charmbracelet/gold/raw/master/styles/gallery/dark.png     -                                                                              - Check out the Gold Style Gallery                                             - https://github.com/charmbracelet/gold/blob/master/styles/gallery/README.md!  +                                                                              + Image: Gold Dark Style →                                                     + https://github.com/charmbracelet/gold/raw/master/styles/gallery/dark.png     +                                                                              + Check out the Gold Style Gallery                                             + https://github.com/charmbracelet/gold/blob/master/styles/gallery/README.md!                                                                                 ## Colors                                                                    -                                                                              - Currently  gold  uses the Aurora ANSI colors                                 - https://godoc.org/github.com/logrusorgru/aurora#Index.                       +                                                                              + Currently  gold  uses the Aurora ANSI colors                                 + https://godoc.org/github.com/logrusorgru/aurora#Index.                                                                                                      ## Development                                                               -                                                                              - Style definitions located in  styles/  can be embedded into the binary by    - running statik https://github.com/rakyll/statik:                             -                                                                              +                                                                              + Style definitions located in  styles/  can be embedded into the binary by    + running statik https://github.com/rakyll/statik:                             +                                                                                 statik -f -src styles -include "*.json"                                    -                                                                              - You can re-generate screenshots of all available styles by running           - gallery.sh . This requires  termshot  and  pngcrush  installed on your       - system!                                                                      +                                                                              + You can re-generate screenshots of all available styles by running           + gallery.sh . This requires  termshot  and  pngcrush  installed on your       + system!                                                                      diff --git a/testdata/strikethrough.test b/testdata/strikethrough.test index c28caf6..7aae17a 100644 --- a/testdata/strikethrough.test +++ b/testdata/strikethrough.test @@ -1 +1 @@ -Scratch this.  +Scratch this. diff --git a/testdata/strong.test b/testdata/strong.test index d4b7f74..3347042 100644 --- a/testdata/strong.test +++ b/testdata/strong.test @@ -1 +1 @@ -This text is strong.  +This text is strong. diff --git a/testdata/task.test b/testdata/task.test index 958c404..ead7134 100644 --- a/testdata/task.test +++ b/testdata/task.test @@ -1,3 +1,3 @@ -✓ Finished Task                                                                  -✗ Outstanding Task                                                               +✓ Finished Task                                                                  +✗ Outstanding Task