From 27c2628fb504b07a1ab59adda91547d8b2446f9b Mon Sep 17 00:00:00 2001 From: Jahvon Dockery Date: Tue, 6 Aug 2024 20:56:08 -0400 Subject: [PATCH 1/3] Fix spacing for block stack elements --- ansi/blockstack.go | 4 ++-- ansi/heading.go | 19 +++---------------- 2 files changed, 5 insertions(+), 18 deletions(-) diff --git a/ansi/blockstack.go b/ansi/blockstack.go index 0af22a8f..2b48415c 100644 --- a/ansi/blockstack.go +++ b/ansi/blockstack.go @@ -59,10 +59,10 @@ func (s BlockStack) Margin() uint { // Width returns the available rendering width. func (s BlockStack) Width(ctx RenderContext) uint { - if s.Indent()*s.Margin() > uint(ctx.options.WordWrap) { + if s.Indent()+s.Margin() > uint(ctx.options.WordWrap) { return 0 } - return uint(ctx.options.WordWrap) - s.Indent()*s.Margin() + return uint(ctx.options.WordWrap) - s.Indent() - s.Margin() } // Parent returns the current BlockElement's parent. diff --git a/ansi/heading.go b/ansi/heading.go index 9d5634cf..b7e2e755 100644 --- a/ansi/heading.go +++ b/ansi/heading.go @@ -4,7 +4,6 @@ import ( "bytes" "io" - "github.com/muesli/reflow/indent" "github.com/muesli/reflow/wordwrap" ) @@ -60,28 +59,16 @@ func (e *HeadingElement) Render(w io.Writer, ctx RenderContext) error { func (e *HeadingElement) Finish(w io.Writer, ctx RenderContext) error { bs := ctx.blockStack rules := bs.Current().Style + mw := NewMarginWriter(ctx, w, rules) - var indentation uint - var margin uint - if rules.Indent != nil { - indentation = *rules.Indent - } - if rules.Margin != nil { - margin = *rules.Margin - } - - iw := indent.NewWriterPipe(w, indentation+margin, func(wr io.Writer) { - renderText(w, ctx.options.ColorProfile, bs.Parent().Style.StylePrimitive, " ") - }) - - flow := wordwrap.NewWriter(int(bs.Width(ctx) - indentation - margin*2)) + flow := wordwrap.NewWriter(int(bs.Width(ctx))) _, err := flow.Write(bs.Current().Block.Bytes()) if err != nil { return err } flow.Close() - _, err = iw.Write(flow.Bytes()) + _, err = mw.Write(flow.Bytes()) if err != nil { return err } From 44a54a6d58069bad4d2cdb101cb435c1447bb15c Mon Sep 17 00:00:00 2001 From: Jahvon Dockery Date: Tue, 6 Aug 2024 21:42:50 -0400 Subject: [PATCH 2/3] update golden files --- ansi/testdata/TestRenderer/block_quote.golden | 2 +- ansi/testdata/TestRenderer/list.golden | 2 +- ansi/testdata/TestRendererIssues/106.golden | 30 ++++---- ansi/testdata/TestRendererIssues/107.golden | 10 +-- ansi/testdata/TestRendererIssues/117.golden | 8 +- ansi/testdata/TestRendererIssues/149.golden | 6 +- ansi/testdata/TestRendererIssues/172.golden | 8 +- ansi/testdata/TestRendererIssues/237.golden | 14 ++-- ansi/testdata/TestRendererIssues/239.golden | 14 ++-- ansi/testdata/TestRendererIssues/257.golden | 4 +- ansi/testdata/TestRendererIssues/290.golden | 8 +- ansi/testdata/TestRendererIssues/312.golden | 30 ++++---- ansi/testdata/TestRendererIssues/313.golden | 12 +-- ansi/testdata/TestRendererIssues/315.golden | 8 +- ansi/testdata/TestRendererIssues/316.golden | 10 +-- ansi/testdata/TestRendererIssues/42.golden | 8 +- ansi/testdata/TestRendererIssues/43.golden | 16 ++-- ansi/testdata/TestRendererIssues/44.golden | 14 ++-- ansi/testdata/TestRendererIssues/46_1.golden | 8 +- ansi/testdata/TestRendererIssues/46_2.golden | 24 +++--- ansi/testdata/TestRendererIssues/47.golden | 2 +- ansi/testdata/TestRendererIssues/48.golden | 30 ++++---- ansi/testdata/TestRendererIssues/60.golden | 52 ++++++------- ansi/testdata/TestRendererIssues/79.golden | 14 ++-- testdata/TestCapitalization.golden | 10 +-- testdata/TestRenderHelpers.golden | 74 +++++++++---------- testdata/TestTermRenderer.golden | 74 +++++++++---------- testdata/TestTermRendererWriter.golden | 74 +++++++++---------- 28 files changed, 283 insertions(+), 283 deletions(-) diff --git a/ansi/testdata/TestRenderer/block_quote.golden b/ansi/testdata/TestRenderer/block_quote.golden index 2b420000..8bc88d84 100644 --- a/ansi/testdata/TestRenderer/block_quote.golden +++ b/ansi/testdata/TestRenderer/block_quote.golden @@ -1,2 +1,2 @@ -=> First line of quote Second line                                                 +=> First line of quote Second line                                                diff --git a/ansi/testdata/TestRenderer/list.golden b/ansi/testdata/TestRenderer/list.golden index 8374a0aa..4ba92dc8 100644 --- a/ansi/testdata/TestRenderer/list.golden +++ b/ansi/testdata/TestRenderer/list.golden @@ -1,4 +1,4 @@ • First Item                                                                     -    • Nested List Item                                                             +    • Nested List Item                                                           • Second Item                                                                    diff --git a/ansi/testdata/TestRendererIssues/106.golden b/ansi/testdata/TestRendererIssues/106.golden index a1c0f80d..22c158f9 100644 --- a/ansi/testdata/TestRendererIssues/106.golden +++ b/ansi/testdata/TestRendererIssues/106.golden @@ -1,17 +1,17 @@ -                                                                                  - • `hi`                                                                           - • \hi                                                                            - • *hi                                                                            - • _hi                                                                            - • {hi}                                                                           - • [hi]                                                                           - •                                                                            - • (hi)                                                                           - • # hi                                                                           - • + hi                                                                           - • - hi                                                                           - • . hi                                                                           - • ! hi                                                                           - • | hi                                                                           +                                                                                + • `hi`                                                                         + • \hi                                                                          + • *hi                                                                          + • _hi                                                                          + • {hi}                                                                         + • [hi]                                                                         + •                                                                          + • (hi)                                                                         + • # hi                                                                         + • + hi                                                                         + • - hi                                                                         + • . hi                                                                         + • ! hi                                                                         + • | hi                                                                         diff --git a/ansi/testdata/TestRendererIssues/107.golden b/ansi/testdata/TestRendererIssues/107.golden index 424915d8..07f8af83 100644 --- a/ansi/testdata/TestRendererIssues/107.golden +++ b/ansi/testdata/TestRendererIssues/107.golden @@ -1,7 +1,7 @@ -                                                                                  -   [Mount]                                                                        -   Options=reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,noauto,_netdev, - allow_other,uid=1000,gid=1000,IdentityFile=/PATH/TO/SSH-KEY/id_rsa,              - StrictHostKeyChecking=no                                                         +                                                                                +   [Mount]                                                                      +   Options=reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,noauto,       + _netdev,allow_other,uid=1000,gid=1000,IdentityFile=/PATH/TO/SSH-KEY/id_rsa,    + StrictHostKeyChecking=no                                                        diff --git a/ansi/testdata/TestRendererIssues/117.golden b/ansi/testdata/TestRendererIssues/117.golden index 22637fc2..96e171fd 100644 --- a/ansi/testdata/TestRendererIssues/117.golden +++ b/ansi/testdata/TestRendererIssues/117.golden @@ -1,6 +1,6 @@ -                                                                                  - cmd │descr - ──────────────────────────────────────┼───────────────────────────────────────── -  glow config  │open glow config +                                                                                + cmd │descr + ─────────────────────────────────────┼──────────────────────────────────────── +  glow config  │open glow config diff --git a/ansi/testdata/TestRendererIssues/149.golden b/ansi/testdata/TestRendererIssues/149.golden index 00a99f11..9b017da6 100644 --- a/ansi/testdata/TestRendererIssues/149.golden +++ b/ansi/testdata/TestRendererIssues/149.golden @@ -1,5 +1,5 @@ - a http://example.com/with-a-big-path/likely-to-use-more-than-one-line?why-       - not=after-all-why-                                                               - not-use-queryparams-too&abc=123                                                  + a http://example.com/with-a-big-path/likely-to-use-more-than-one-line?why-     + not=after-all-                                                                 + why-not-use-queryparams-too&abc=123                                            diff --git a/ansi/testdata/TestRendererIssues/172.golden b/ansi/testdata/TestRendererIssues/172.golden index e70f14c2..c1020f26 100644 --- a/ansi/testdata/TestRendererIssues/172.golden +++ b/ansi/testdata/TestRendererIssues/172.golden @@ -1,6 +1,6 @@ -                                                                                  - │ The quick brown fox jumps over the lazy dog. The quick brown fox jumps over    - │ the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox - │ jumps over the lazy dog.                                                       +                                                                                + │ The quick brown fox jumps over the lazy dog. The quick brown fox jumps over  + │ the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown   + │ fox jumps over the lazy dog.                                                 diff --git a/ansi/testdata/TestRendererIssues/237.golden b/ansi/testdata/TestRendererIssues/237.golden index 1b97b5ef..06b90c13 100644 --- a/ansi/testdata/TestRendererIssues/237.golden +++ b/ansi/testdata/TestRendererIssues/237.golden @@ -1,9 +1,9 @@ -                                                                                  - │ Content Security Policy (CSP) is an added layer of security that helps to      - │ detect and mitigate certain types of attacks, including Cross-Site Scripting   - │ (XSS) and data injection attacks. These attacks are used for everything from   - │ data theft, to site defacement, to malware distribution.                       - │                                                                                - │ from MDN                                                                       +                                                                                + │ Content Security Policy (CSP) is an added layer of security that helps to    + │ detect and mitigate certain types of attacks, including Cross-Site Scripting + │ (XSS) and data injection attacks. These attacks are used for everything from + │ data theft, to site defacement, to malware distribution.                     + │                                                                              + │ from MDN                                                                     diff --git a/ansi/testdata/TestRendererIssues/239.golden b/ansi/testdata/TestRendererIssues/239.golden index 8cf5a609..7839b1dd 100644 --- a/ansi/testdata/TestRendererIssues/239.golden +++ b/ansi/testdata/TestRendererIssues/239.golden @@ -1,9 +1,9 @@ -                                                                                  - First term                                                                       - 🠶 Definition one of first term.                                                  -                                                                                  - Second term                                                                      - 🠶 Definition one of second term.                                                 -                                                                                  +                                                                                + First term                                                                     + 🠶 Definition one of first term.                                                +                                                                                + Second term                                                                    + 🠶 Definition one of second term.                                               +                                                                                diff --git a/ansi/testdata/TestRendererIssues/257.golden b/ansi/testdata/TestRendererIssues/257.golden index 0a3b9c2c..a00e22a1 100644 --- a/ansi/testdata/TestRendererIssues/257.golden +++ b/ansi/testdata/TestRendererIssues/257.golden @@ -1,4 +1,4 @@ -                                                                                  -   set runtimepath^=$XDG_CONFIG_HOME/vim                                          +                                                                                +   set runtimepath^=$XDG_CONFIG_HOME/vim                                         diff --git a/ansi/testdata/TestRendererIssues/290.golden b/ansi/testdata/TestRendererIssues/290.golden index 95ed4cd4..b4a13895 100644 --- a/ansi/testdata/TestRendererIssues/290.golden +++ b/ansi/testdata/TestRendererIssues/290.golden @@ -1,6 +1,6 @@ -                                                                                  - • test@example.com mailto:test@example.com                                       - • https://google.com https://google.com                                          - • https://google.com https://google.com                                          +                                                                                + • test@example.com mailto:test@example.com                                     + • https://google.com https://google.com                                        + • https://google.com https://google.com                                        diff --git a/ansi/testdata/TestRendererIssues/312.golden b/ansi/testdata/TestRendererIssues/312.golden index 81dc1de2..ce24d05b 100644 --- a/ansi/testdata/TestRendererIssues/312.golden +++ b/ansi/testdata/TestRendererIssues/312.golden @@ -1,17 +1,17 @@ -  File                                                                            -                                                                                  - bold text with URL https://www.example.com                                       -                                                                                  - italic text with URL https://www.example.com                                     -                                                                                  - URL https://www.example.com                                                      -                                                                                  - url with bold within https://www.example.com                                     -                                                                                  - url with italic within https://www.example.com                                   -                                                                                  - entire url text is bold https://www.example.com                                  -                                                                                  - entire url text is italic https://www.example.com                                +  File                                                                          +                                                                                + bold text with URL https://www.example.com                                     +                                                                                + italic text with URL https://www.example.com                                   +                                                                                + URL https://www.example.com                                                    +                                                                                + url with bold within https://www.example.com                                   +                                                                                + url with italic within https://www.example.com                                 +                                                                                + entire url text is bold https://www.example.com                                +                                                                                + entire url text is italic https://www.example.com                              diff --git a/ansi/testdata/TestRendererIssues/313.golden b/ansi/testdata/TestRendererIssues/313.golden index c1c25dfe..eda20bf0 100644 --- a/ansi/testdata/TestRendererIssues/313.golden +++ b/ansi/testdata/TestRendererIssues/313.golden @@ -1,8 +1,8 @@ -                                                                                  - │ This is a block quote                                                          - │                                                                                - │ │ This is the nested quote                                                     - │                                                                                - │ This is part of the outer block quote.                                         +                                                                                + │ This is a block quote                                                        + │                                                                              + │ │ This is the nested quote                                                   + │                                                                              + │ This is part of the outer block quote.                                       diff --git a/ansi/testdata/TestRendererIssues/315.golden b/ansi/testdata/TestRendererIssues/315.golden index e7ca1fc2..e40313eb 100644 --- a/ansi/testdata/TestRendererIssues/315.golden +++ b/ansi/testdata/TestRendererIssues/315.golden @@ -1,6 +1,6 @@ -                                                                                  - Expression │Value │Type - ────────────────────────────────────────────┼──────────────────┼──────────────── -  (1 >= 26) || (12 >= 6) {.java} │s │a +                                                                                + Expression │Value │Type + ───────────────────────────────────────────┼─────────────────┼──────────────── +  (1 >= 26) || (12 >= 6) {.java} │s │a diff --git a/ansi/testdata/TestRendererIssues/316.golden b/ansi/testdata/TestRendererIssues/316.golden index 131cba89..5325438c 100644 --- a/ansi/testdata/TestRendererIssues/316.golden +++ b/ansi/testdata/TestRendererIssues/316.golden @@ -1,7 +1,7 @@ -                                                                                  - A│B - ──────────────────────────────────────────────────────────┼───────────────────── - Here https://example.com│hello - https://autolink.com https://autolink.com│world +                                                                                + A│B + ─────────────────────────────────────────────────────────┼──────────────────── + Here https://example.com│hello + https://autolink.com https://autolink.com│world diff --git a/ansi/testdata/TestRendererIssues/42.golden b/ansi/testdata/TestRendererIssues/42.golden index 3e12e449..aa64a4eb 100644 --- a/ansi/testdata/TestRendererIssues/42.golden +++ b/ansi/testdata/TestRendererIssues/42.golden @@ -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/ansi/testdata/TestRendererIssues/43.golden b/ansi/testdata/TestRendererIssues/43.golden index c2092e26..ba331265 100644 --- a/ansi/testdata/TestRendererIssues/43.golden +++ b/ansi/testdata/TestRendererIssues/43.golden @@ -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/ansi/testdata/TestRendererIssues/44.golden b/ansi/testdata/TestRendererIssues/44.golden index cf12febd..022523a7 100644 --- a/ansi/testdata/TestRendererIssues/44.golden +++ b/ansi/testdata/TestRendererIssues/44.golden @@ -1,9 +1,9 @@ -                                                                                  - Distri…│Architectures │Package - ───────┼───────────────────────────────────┼──────────────────────────────────── - Debian │ amd64 ,  arm64 ,  armel ,  i386 ,…│ deb  https://github.com/twpayne/ch… - RedHat │ aarch64 ,  armhfp ,  i686 ,  ppc6…│ rpm  https://github.com/twpayne/ch… - OpenSU…│ aarch64 ,  armhfp ,  i686 ,  ppc6…│ rpm  https://github.com/twpayne/ch… - Ubuntu │ amd64 ,  arm64 ,  armel ,  i386 ,…│ deb  https://github.com/twpayne/ch… +                                                                                + Distri…│Architectures │Package + ───────┼──────────────────────────────────┼─────────────────────────────────── + Debian │ amd64 ,  arm64 ,  armel ,  i386 …│ deb  https://github.com/twpayne/c… + RedHat │ aarch64 ,  armhfp ,  i686 ,  ppc…│ rpm  https://github.com/twpayne/c… + OpenSU…│ aarch64 ,  armhfp ,  i686 ,  ppc…│ rpm  https://github.com/twpayne/c… + Ubuntu │ amd64 ,  arm64 ,  armel ,  i386 …│ deb  https://github.com/twpayne/c… diff --git a/ansi/testdata/TestRendererIssues/46_1.golden b/ansi/testdata/TestRendererIssues/46_1.golden index 3150d107..14722c70 100644 --- a/ansi/testdata/TestRendererIssues/46_1.golden +++ b/ansi/testdata/TestRendererIssues/46_1.golden @@ -1,6 +1,6 @@ -                                                                                  - • Navigation                                                                     -   • Familiar shortcuts (arrows, ~, -, @), quick reference                        -                                                                                  +                                                                                + • Navigation                                                                   +   • Familiar shortcuts (arrows, ~, -, @), quick reference                      +                                                                                diff --git a/ansi/testdata/TestRendererIssues/46_2.golden b/ansi/testdata/TestRendererIssues/46_2.golden index 62aa4370..9a624050 100644 --- a/ansi/testdata/TestRendererIssues/46_2.golden +++ b/ansi/testdata/TestRendererIssues/46_2.golden @@ -1,14 +1,14 @@ -                                                                                  - Dependency │Installa…│Operation - ─────────────────────────────────────────────┼─────────┼──────────────────────── - xdg-open (Linux), open(1) (macOS), cygstart …│base │desktop opener - file, coreutils (cp, mv, rm), xargs │base │file type, copy, move a… - tar, (un)zip [atool/bsdtar for more formats] │base │create, list, extract t… - archivemount, fusermount(3) │optional │mount, unmount archives - sshfs, rclone https://rclone.org/, fusermoun…│optional │mount, unmount remotes - trash-cli │optional │trash files (default ac… - vlock (Linux), bashlock (macOS), lock(1) (BS…│optional │terminal locker (fallba… - advcpmv (Linux) (integration https://github.…│optional │copy, move progress -  $VISUAL  (else  $EDITOR ),  $PAGER ,  $SHEL…│optional │fallback vi, less, sh +                                                                                + Dependency │Installa…│Operation + ───────────────────────────────────────────┼─────────┼──────────────────────── + xdg-open (Linux), open(1) (macOS), cygstar…│base │desktop opener + file, coreutils (cp, mv, rm), xargs │base │file type, copy, move a… + tar, (un)zip [atool/bsdtar for more format…│base │create, list, extract t… + archivemount, fusermount(3) │optional │mount, unmount archives + sshfs, rclone https://rclone.org/, fusermo…│optional │mount, unmount remotes + trash-cli │optional │trash files (default ac… + vlock (Linux), bashlock (macOS), lock(1) (…│optional │terminal locker (fallba… + advcpmv (Linux) (integration https://githu…│optional │copy, move progress +  $VISUAL  (else  $EDITOR ),  $PAGER ,  $SH…│optional │fallback vi, less, sh diff --git a/ansi/testdata/TestRendererIssues/47.golden b/ansi/testdata/TestRendererIssues/47.golden index 20b0fd9b..485954f4 100644 --- a/ansi/testdata/TestRendererIssues/47.golden +++ b/ansi/testdata/TestRendererIssues/47.golden @@ -1,3 +1,3 @@ - Example:                                                        + Example:                                                      diff --git a/ansi/testdata/TestRendererIssues/48.golden b/ansi/testdata/TestRendererIssues/48.golden index ee82302f..d62cf8ba 100644 --- a/ansi/testdata/TestRendererIssues/48.golden +++ b/ansi/testdata/TestRendererIssues/48.golden @@ -1,17 +1,17 @@ - emoji in text                                                                    -                                                                                  - 🐙 ⚡ 🐱 = ❤️                                                                    -                                                                                  - emoji in header                                                                  -                                                                                  - ## 🐙 ⚡ 🐱 = ❤️                                                                 -                                                                                  - no emoji in code blocks                                                          -                                                                                  -   :octopus: :zap: :cat: = :heart:                                                -                                                                                  - no emoji in inline code                                                          -                                                                                  -  :octopus: :zap: :cat: = :heart:                                                 + emoji in text                                                                  +                                                                                + 🐙 ⚡ 🐱 = ❤️                                                                  +                                                                                + emoji in header                                                                +                                                                                + ## 🐙 ⚡ 🐱 = ❤️                                                               +                                                                                + no emoji in code blocks                                                        +                                                                                +   :octopus: :zap: :cat: = :heart:                                              +                                                                                + no emoji in inline code                                                        +                                                                                +  :octopus: :zap: :cat: = :heart:                                               diff --git a/ansi/testdata/TestRendererIssues/60.golden b/ansi/testdata/TestRendererIssues/60.golden index c6e009b5..e7017ce0 100644 --- a/ansi/testdata/TestRendererIssues/60.golden +++ b/ansi/testdata/TestRendererIssues/60.golden @@ -1,28 +1,28 @@ -                                                                                  - Library │Version - ───────────────────────────────────────────────────────────────┼──────────────── - ESMF https://github.com/esmf-org/esmf │v8.6.1 - FMS https://github.com/NOAA-GFDL/FMS/ │2024.01.02 - netCDF https://github.com/Unidata/netcdf-c │4.9.2 - netCDF Fortran https://github.com/Unidata/netcdf-fortran │4.6.1 - netCDF C++ https://github.com/Unidata/netcdf-cxx4 │4.3.1 - HDF5 https://portal.hdfgroup.org/display/support │1.10.11 - HDF4 https://portal.hdfgroup.org/display/support │4.2.16-2 - GFE https://github.com/Goddard-Fortran-Ecosystem/GFE │v1.16.0 - xgboost https://github.com/dmlc/xgboost │v1.6.0 - libyaml https://github.com/yaml/libyaml.git │0.2.5 - antlr2 https://www.antlr2.org/ │2.7.7 - GSL https://www.gnu.org/software/gsl/ │2.7 - jpeg http://www.ijg.org/ │9e - zlib http://www.zlib.net/ │1.3.1 - szip https://support.hdfgroup.org/doc_resource/SZIP/ │2.1.1 - cURL https://curl.haxx.se/ │8.8.0 - UDUNITS2 https://github.com/GMAO-SI-Team/UDUNITS-2.git │2.2.28 - NCO http://nco.sourceforge.net/ │5.2.6 - CDO https://code.mpimet.mpg.de/projects/cdo │2.3.0 - nccmp https://gitlab.com/remikz/nccmp │1.9.1.0 - HDF-EOS2 https://wiki.earthdata.nasa.gov/display/DAS │3.0 - HDF-EOS5 https://wiki.earthdata.nasa.gov/display/DAS │2.0 - SDP Toolkit https://wiki.earthdata.nasa.gov/display/DAS │5.2.20 +                                                                                + Library │Version + ──────────────────────────────────────────────────────────────┼─────────────── + ESMF https://github.com/esmf-org/esmf │v8.6.1 + FMS https://github.com/NOAA-GFDL/FMS/ │2024.01.02 + netCDF https://github.com/Unidata/netcdf-c │4.9.2 + netCDF Fortran https://github.com/Unidata/netcdf-fortran │4.6.1 + netCDF C++ https://github.com/Unidata/netcdf-cxx4 │4.3.1 + HDF5 https://portal.hdfgroup.org/display/support │1.10.11 + HDF4 https://portal.hdfgroup.org/display/support │4.2.16-2 + GFE https://github.com/Goddard-Fortran-Ecosystem/GFE │v1.16.0 + xgboost https://github.com/dmlc/xgboost │v1.6.0 + libyaml https://github.com/yaml/libyaml.git │0.2.5 + antlr2 https://www.antlr2.org/ │2.7.7 + GSL https://www.gnu.org/software/gsl/ │2.7 + jpeg http://www.ijg.org/ │9e + zlib http://www.zlib.net/ │1.3.1 + szip https://support.hdfgroup.org/doc_resource/SZIP/ │2.1.1 + cURL https://curl.haxx.se/ │8.8.0 + UDUNITS2 https://github.com/GMAO-SI-Team/UDUNITS-2.git │2.2.28 + NCO http://nco.sourceforge.net/ │5.2.6 + CDO https://code.mpimet.mpg.de/projects/cdo │2.3.0 + nccmp https://gitlab.com/remikz/nccmp │1.9.1.0 + HDF-EOS2 https://wiki.earthdata.nasa.gov/display/DAS │3.0 + HDF-EOS5 https://wiki.earthdata.nasa.gov/display/DAS │2.0 + SDP Toolkit https://wiki.earthdata.nasa.gov/display/DAS │5.2.20 diff --git a/ansi/testdata/TestRendererIssues/79.golden b/ansi/testdata/TestRendererIssues/79.golden index 6d3fa20a..18de03c8 100644 --- a/ansi/testdata/TestRendererIssues/79.golden +++ b/ansi/testdata/TestRendererIssues/79.golden @@ -1,9 +1,9 @@ - Preceding blockquote paragraph                                                   -                                                                                  - │ 1st blockquote paragraph                                                       - │                                                                                - │   quoted code block                                                            - │                                                                                - │ 2nd blockquote paragraph                                                       + Preceding blockquote paragraph                                                 +                                                                                + │ 1st blockquote paragraph                                                     + │                                                                              + │   quoted code block                                                          + │                                                                              + │ 2nd blockquote paragraph                                                     diff --git a/testdata/TestCapitalization.golden b/testdata/TestCapitalization.golden index fe6e26f0..d5925502 100644 --- a/testdata/TestCapitalization.golden +++ b/testdata/TestCapitalization.golden @@ -1,7 +1,7 @@ -  EVERYTHING IS UPPERCASE                                                         -                                                                                  - ## Everything Is Titled                                                          -                                                                                  - ### everything is lowercase                                                      +  EVERYTHING IS UPPERCASE                                                       +                                                                                + ## Everything Is Titled                                                        +                                                                                + ### everything is lowercase                                                     diff --git a/testdata/TestRenderHelpers.golden b/testdata/TestRenderHelpers.golden index 73b0e93d..260ca1d1 100644 --- a/testdata/TestRenderHelpers.golden +++ b/testdata/TestRenderHelpers.golden @@ -1,39 +1,39 @@ -  Gold                                                                            -                                                                                  - 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.                         -                                                                                  - ## Usage                                                                         -                                                                                  - 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!      -                                                                                  - ## Colors                                                                        -                                                                                  - 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:                                 -                                                                                  -   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!                +  Gold                                                                          +                                                                                + 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.             +                                                                                + ## Usage                                                                       +                                                                                + 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!    +                                                                                + ## Colors                                                                      +                                                                                + 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:                               +                                                                                +   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!            diff --git a/testdata/TestTermRenderer.golden b/testdata/TestTermRenderer.golden index 73b0e93d..260ca1d1 100644 --- a/testdata/TestTermRenderer.golden +++ b/testdata/TestTermRenderer.golden @@ -1,39 +1,39 @@ -  Gold                                                                            -                                                                                  - 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.                         -                                                                                  - ## Usage                                                                         -                                                                                  - 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!      -                                                                                  - ## Colors                                                                        -                                                                                  - 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:                                 -                                                                                  -   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!                +  Gold                                                                          +                                                                                + 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.             +                                                                                + ## Usage                                                                       +                                                                                + 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!    +                                                                                + ## Colors                                                                      +                                                                                + 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:                               +                                                                                +   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!            diff --git a/testdata/TestTermRendererWriter.golden b/testdata/TestTermRendererWriter.golden index 73b0e93d..260ca1d1 100644 --- a/testdata/TestTermRendererWriter.golden +++ b/testdata/TestTermRendererWriter.golden @@ -1,39 +1,39 @@ -  Gold                                                                            -                                                                                  - 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.                         -                                                                                  - ## Usage                                                                         -                                                                                  - 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!      -                                                                                  - ## Colors                                                                        -                                                                                  - 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:                                 -                                                                                  -   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!                +  Gold                                                                          +                                                                                + 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.             +                                                                                + ## Usage                                                                       +                                                                                + 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!    +                                                                                + ## Colors                                                                      +                                                                                + 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:                               +                                                                                +   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!            From b79a5e4eb3aa183e0ef0d36b57dd20b595e553ed Mon Sep 17 00:00:00 2001 From: Jahvon Dockery Date: Fri, 30 Aug 2024 17:52:02 -0400 Subject: [PATCH 3/3] multiple margin by 2 to account for margin-right Co-authored-by: Maximilian Moehl --- ansi/blockstack.go | 4 +- ansi/testdata/TestRendererIssues/106.golden | 30 ++++---- ansi/testdata/TestRendererIssues/107.golden | 10 +-- ansi/testdata/TestRendererIssues/117.golden | 8 +-- ansi/testdata/TestRendererIssues/149.golden | 6 +- ansi/testdata/TestRendererIssues/172.golden | 9 +-- ansi/testdata/TestRendererIssues/237.golden | 15 ++-- ansi/testdata/TestRendererIssues/239.golden | 14 ++-- ansi/testdata/TestRendererIssues/257.golden | 4 +- ansi/testdata/TestRendererIssues/290.golden | 8 +-- ansi/testdata/TestRendererIssues/312.golden | 30 ++++---- ansi/testdata/TestRendererIssues/313.golden | 12 ++-- ansi/testdata/TestRendererIssues/315.golden | 8 +-- ansi/testdata/TestRendererIssues/316.golden | 10 +-- ansi/testdata/TestRendererIssues/42.golden | 9 +-- ansi/testdata/TestRendererIssues/43.golden | 16 ++--- ansi/testdata/TestRendererIssues/44.golden | 14 ++-- ansi/testdata/TestRendererIssues/46_1.golden | 8 +-- ansi/testdata/TestRendererIssues/46_2.golden | 24 +++---- ansi/testdata/TestRendererIssues/47.golden | 2 +- ansi/testdata/TestRendererIssues/48.golden | 30 ++++---- ansi/testdata/TestRendererIssues/60.golden | 52 +++++++------- ansi/testdata/TestRendererIssues/79.golden | 14 ++-- testdata/TestCapitalization.golden | 10 +-- testdata/TestRenderHelpers.golden | 75 ++++++++++---------- testdata/TestTermRenderer.golden | 75 ++++++++++---------- testdata/TestTermRendererWriter.golden | 75 ++++++++++---------- 27 files changed, 289 insertions(+), 283 deletions(-) diff --git a/ansi/blockstack.go b/ansi/blockstack.go index 2b48415c..5440dcbc 100644 --- a/ansi/blockstack.go +++ b/ansi/blockstack.go @@ -59,10 +59,10 @@ func (s BlockStack) Margin() uint { // Width returns the available rendering width. func (s BlockStack) Width(ctx RenderContext) uint { - if s.Indent()+s.Margin() > uint(ctx.options.WordWrap) { + if s.Indent()+s.Margin()*2 > uint(ctx.options.WordWrap) { return 0 } - return uint(ctx.options.WordWrap) - s.Indent() - s.Margin() + return uint(ctx.options.WordWrap) - s.Indent() - s.Margin()*2 } // Parent returns the current BlockElement's parent. diff --git a/ansi/testdata/TestRendererIssues/106.golden b/ansi/testdata/TestRendererIssues/106.golden index 22c158f9..6a0e4633 100644 --- a/ansi/testdata/TestRendererIssues/106.golden +++ b/ansi/testdata/TestRendererIssues/106.golden @@ -1,17 +1,17 @@ -                                                                                - • `hi`                                                                         - • \hi                                                                          - • *hi                                                                          - • _hi                                                                          - • {hi}                                                                         - • [hi]                                                                         - •                                                                          - • (hi)                                                                         - • # hi                                                                         - • + hi                                                                         - • - hi                                                                         - • . hi                                                                         - • ! hi                                                                         - • | hi                                                                         +                                                                              + • `hi`                                                                       + • \hi                                                                        + • *hi                                                                        + • _hi                                                                        + • {hi}                                                                       + • [hi]                                                                       + •                                                                        + • (hi)                                                                       + • # hi                                                                       + • + hi                                                                       + • - hi                                                                       + • . hi                                                                       + • ! hi                                                                       + • | hi                                                                       diff --git a/ansi/testdata/TestRendererIssues/107.golden b/ansi/testdata/TestRendererIssues/107.golden index 07f8af83..87796cf0 100644 --- a/ansi/testdata/TestRendererIssues/107.golden +++ b/ansi/testdata/TestRendererIssues/107.golden @@ -1,7 +1,7 @@ -                                                                                -   [Mount]                                                                      -   Options=reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,noauto,       - _netdev,allow_other,uid=1000,gid=1000,IdentityFile=/PATH/TO/SSH-KEY/id_rsa,    - StrictHostKeyChecking=no                                                       +                                                                              +   [Mount]                                                                    +   Options=reconnect,ServerAliveInterval=15,ServerAliveCountMax=3,noauto,     + _netdev,allow_other,uid=1000,gid=1000,IdentityFile=/PATH/TO/SSH-KEY/id_rsa,  + StrictHostKeyChecking=no                                                      diff --git a/ansi/testdata/TestRendererIssues/117.golden b/ansi/testdata/TestRendererIssues/117.golden index 96e171fd..6456bf56 100644 --- a/ansi/testdata/TestRendererIssues/117.golden +++ b/ansi/testdata/TestRendererIssues/117.golden @@ -1,6 +1,6 @@ -                                                                                - cmd │descr - ─────────────────────────────────────┼──────────────────────────────────────── -  glow config  │open glow config +                                                                              + cmd │descr + ────────────────────────────────────┼─────────────────────────────────────── +  glow config  │open glow config diff --git a/ansi/testdata/TestRendererIssues/149.golden b/ansi/testdata/TestRendererIssues/149.golden index 9b017da6..86069be8 100644 --- a/ansi/testdata/TestRendererIssues/149.golden +++ b/ansi/testdata/TestRendererIssues/149.golden @@ -1,5 +1,5 @@ - a http://example.com/with-a-big-path/likely-to-use-more-than-one-line?why-     - not=after-all-                                                                 - why-not-use-queryparams-too&abc=123                                            + a http://example.com/with-a-big-path/likely-to-use-more-than-one-line?why-   + not=after-all-                                                               + why-not-use-queryparams-too&abc=123                                          diff --git a/ansi/testdata/TestRendererIssues/172.golden b/ansi/testdata/TestRendererIssues/172.golden index c1020f26..5afc5636 100644 --- a/ansi/testdata/TestRendererIssues/172.golden +++ b/ansi/testdata/TestRendererIssues/172.golden @@ -1,6 +1,7 @@ -                                                                                - │ The quick brown fox jumps over the lazy dog. The quick brown fox jumps over  - │ the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown   - │ fox jumps over the lazy dog.                                                 +                                                                              + │ The quick brown fox jumps over the lazy dog. The quick brown fox jumps     + over                                                                         + │ the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown + │ fox jumps over the lazy dog.                                               diff --git a/ansi/testdata/TestRendererIssues/237.golden b/ansi/testdata/TestRendererIssues/237.golden index 06b90c13..28c37995 100644 --- a/ansi/testdata/TestRendererIssues/237.golden +++ b/ansi/testdata/TestRendererIssues/237.golden @@ -1,9 +1,10 @@ -                                                                                - │ Content Security Policy (CSP) is an added layer of security that helps to    - │ detect and mitigate certain types of attacks, including Cross-Site Scripting - │ (XSS) and data injection attacks. These attacks are used for everything from - │ data theft, to site defacement, to malware distribution.                     - │                                                                              - │ from MDN                                                                     +                                                                              + │ Content Security Policy (CSP) is an added layer of security that helps to  + │ detect and mitigate certain types of attacks, including Cross-Site         + │ Scripting                                                                  + │ (XSS) and data injection attacks. These attacks are used for everything    + │ from data theft, to site defacement, to malware distribution.              + │                                                                            + │ from MDN                                                                   diff --git a/ansi/testdata/TestRendererIssues/239.golden b/ansi/testdata/TestRendererIssues/239.golden index 7839b1dd..0d88ee10 100644 --- a/ansi/testdata/TestRendererIssues/239.golden +++ b/ansi/testdata/TestRendererIssues/239.golden @@ -1,9 +1,9 @@ -                                                                                - First term                                                                     - 🠶 Definition one of first term.                                                -                                                                                - Second term                                                                    - 🠶 Definition one of second term.                                               -                                                                                +                                                                              + First term                                                                   + 🠶 Definition one of first term.                                              +                                                                              + Second term                                                                  + 🠶 Definition one of second term.                                             +                                                                              diff --git a/ansi/testdata/TestRendererIssues/257.golden b/ansi/testdata/TestRendererIssues/257.golden index a00e22a1..eeffc6db 100644 --- a/ansi/testdata/TestRendererIssues/257.golden +++ b/ansi/testdata/TestRendererIssues/257.golden @@ -1,4 +1,4 @@ -                                                                                -   set runtimepath^=$XDG_CONFIG_HOME/vim                                        +                                                                              +   set runtimepath^=$XDG_CONFIG_HOME/vim                                       diff --git a/ansi/testdata/TestRendererIssues/290.golden b/ansi/testdata/TestRendererIssues/290.golden index b4a13895..1cc53087 100644 --- a/ansi/testdata/TestRendererIssues/290.golden +++ b/ansi/testdata/TestRendererIssues/290.golden @@ -1,6 +1,6 @@ -                                                                                - • test@example.com mailto:test@example.com                                     - • https://google.com https://google.com                                        - • https://google.com https://google.com                                        +                                                                              + • test@example.com mailto:test@example.com                                   + • https://google.com https://google.com                                      + • https://google.com https://google.com                                      diff --git a/ansi/testdata/TestRendererIssues/312.golden b/ansi/testdata/TestRendererIssues/312.golden index ce24d05b..48c9c0ba 100644 --- a/ansi/testdata/TestRendererIssues/312.golden +++ b/ansi/testdata/TestRendererIssues/312.golden @@ -1,17 +1,17 @@ -  File                                                                          -                                                                                - bold text with URL https://www.example.com                                     -                                                                                - italic text with URL https://www.example.com                                   -                                                                                - URL https://www.example.com                                                    -                                                                                - url with bold within https://www.example.com                                   -                                                                                - url with italic within https://www.example.com                                 -                                                                                - entire url text is bold https://www.example.com                                -                                                                                - entire url text is italic https://www.example.com                              +  File                                                                        +                                                                              + bold text with URL https://www.example.com                                   +                                                                              + italic text with URL https://www.example.com                                 +                                                                              + URL https://www.example.com                                                  +                                                                              + url with bold within https://www.example.com                                 +                                                                              + url with italic within https://www.example.com                               +                                                                              + entire url text is bold https://www.example.com                              +                                                                              + entire url text is italic https://www.example.com                            diff --git a/ansi/testdata/TestRendererIssues/313.golden b/ansi/testdata/TestRendererIssues/313.golden index eda20bf0..127f65e2 100644 --- a/ansi/testdata/TestRendererIssues/313.golden +++ b/ansi/testdata/TestRendererIssues/313.golden @@ -1,8 +1,8 @@ -                                                                                - │ This is a block quote                                                        - │                                                                              - │ │ This is the nested quote                                                   - │                                                                              - │ This is part of the outer block quote.                                       +                                                                              + │ This is a block quote                                                      + │                                                                            + │ │ This is the nested quote                                                 + │                                                                            + │ This is part of the outer block quote.                                     diff --git a/ansi/testdata/TestRendererIssues/315.golden b/ansi/testdata/TestRendererIssues/315.golden index e40313eb..4cbc3d8e 100644 --- a/ansi/testdata/TestRendererIssues/315.golden +++ b/ansi/testdata/TestRendererIssues/315.golden @@ -1,6 +1,6 @@ -                                                                                - Expression │Value │Type - ───────────────────────────────────────────┼─────────────────┼──────────────── -  (1 >= 26) || (12 >= 6) {.java} │s │a +                                                                              + Expression │Value │Type + ───────────────────────────────────────────┼────────────────┼─────────────── +  (1 >= 26) || (12 >= 6) {.java} │s │a diff --git a/ansi/testdata/TestRendererIssues/316.golden b/ansi/testdata/TestRendererIssues/316.golden index 5325438c..4a7e2032 100644 --- a/ansi/testdata/TestRendererIssues/316.golden +++ b/ansi/testdata/TestRendererIssues/316.golden @@ -1,7 +1,7 @@ -                                                                                - A│B - ─────────────────────────────────────────────────────────┼──────────────────── - Here https://example.com│hello - https://autolink.com https://autolink.com│world +                                                                              + A│B + ────────────────────────────────────────────────────────┼─────────────────── + Here https://example.com│hello + https://autolink.com https://autolink.com│world diff --git a/ansi/testdata/TestRendererIssues/42.golden b/ansi/testdata/TestRendererIssues/42.golden index aa64a4eb..19478759 100644 --- a/ansi/testdata/TestRendererIssues/42.golden +++ b/ansi/testdata/TestRendererIssues/42.golden @@ -1,6 +1,7 @@ - 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/ansi/testdata/TestRendererIssues/43.golden b/ansi/testdata/TestRendererIssues/43.golden index ba331265..f88488f2 100644 --- a/ansi/testdata/TestRendererIssues/43.golden +++ b/ansi/testdata/TestRendererIssues/43.golden @@ -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/ansi/testdata/TestRendererIssues/44.golden b/ansi/testdata/TestRendererIssues/44.golden index 022523a7..60fb0347 100644 --- a/ansi/testdata/TestRendererIssues/44.golden +++ b/ansi/testdata/TestRendererIssues/44.golden @@ -1,9 +1,9 @@ -                                                                                - Distri…│Architectures │Package - ───────┼──────────────────────────────────┼─────────────────────────────────── - Debian │ amd64 ,  arm64 ,  armel ,  i386 …│ deb  https://github.com/twpayne/c… - RedHat │ aarch64 ,  armhfp ,  i686 ,  ppc…│ rpm  https://github.com/twpayne/c… - OpenSU…│ aarch64 ,  armhfp ,  i686 ,  ppc…│ rpm  https://github.com/twpayne/c… - Ubuntu │ amd64 ,  arm64 ,  armel ,  i386 …│ deb  https://github.com/twpayne/c… +                                                                              + Distri…│Architectures │Package + ───────┼─────────────────────────────────┼────────────────────────────────── + Debian │ amd64 ,  arm64 ,  armel ,  i386…│ deb  https://github.com/twpayne/… + RedHat │ aarch64 ,  armhfp ,  i686 ,  pp…│ rpm  https://github.com/twpayne/… + OpenSU…│ aarch64 ,  armhfp ,  i686 ,  pp…│ rpm  https://github.com/twpayne/… + Ubuntu │ amd64 ,  arm64 ,  armel ,  i386…│ deb  https://github.com/twpayne/… diff --git a/ansi/testdata/TestRendererIssues/46_1.golden b/ansi/testdata/TestRendererIssues/46_1.golden index 14722c70..0eb404ed 100644 --- a/ansi/testdata/TestRendererIssues/46_1.golden +++ b/ansi/testdata/TestRendererIssues/46_1.golden @@ -1,6 +1,6 @@ -                                                                                - • Navigation                                                                   -   • Familiar shortcuts (arrows, ~, -, @), quick reference                      -                                                                                +                                                                              + • Navigation                                                                 +   • Familiar shortcuts (arrows, ~, -, @), quick reference                    +                                                                              diff --git a/ansi/testdata/TestRendererIssues/46_2.golden b/ansi/testdata/TestRendererIssues/46_2.golden index 9a624050..745200bc 100644 --- a/ansi/testdata/TestRendererIssues/46_2.golden +++ b/ansi/testdata/TestRendererIssues/46_2.golden @@ -1,14 +1,14 @@ -                                                                                - Dependency │Installa…│Operation - ───────────────────────────────────────────┼─────────┼──────────────────────── - xdg-open (Linux), open(1) (macOS), cygstar…│base │desktop opener - file, coreutils (cp, mv, rm), xargs │base │file type, copy, move a… - tar, (un)zip [atool/bsdtar for more format…│base │create, list, extract t… - archivemount, fusermount(3) │optional │mount, unmount archives - sshfs, rclone https://rclone.org/, fusermo…│optional │mount, unmount remotes - trash-cli │optional │trash files (default ac… - vlock (Linux), bashlock (macOS), lock(1) (…│optional │terminal locker (fallba… - advcpmv (Linux) (integration https://githu…│optional │copy, move progress -  $VISUAL  (else  $EDITOR ),  $PAGER ,  $SH…│optional │fallback vi, less, sh +                                                                              + Dependency │Installa…│Operation + ─────────────────────────────────────────┼─────────┼──────────────────────── + xdg-open (Linux), open(1) (macOS), cygst…│base │desktop opener + file, coreutils (cp, mv, rm), xargs │base │file type, copy, move a… + tar, (un)zip [atool/bsdtar for more form…│base │create, list, extract t… + archivemount, fusermount(3) │optional │mount, unmount archives + sshfs, rclone https://rclone.org/, fuser…│optional │mount, unmount remotes + trash-cli │optional │trash files (default ac… + vlock (Linux), bashlock (macOS), lock(1)…│optional │terminal locker (fallba… + advcpmv (Linux) (integration https://git…│optional │copy, move progress +  $VISUAL  (else  $EDITOR ),  $PAGER ,  $…│optional │fallback vi, less, sh diff --git a/ansi/testdata/TestRendererIssues/47.golden b/ansi/testdata/TestRendererIssues/47.golden index 485954f4..5422c7c3 100644 --- a/ansi/testdata/TestRendererIssues/47.golden +++ b/ansi/testdata/TestRendererIssues/47.golden @@ -1,3 +1,3 @@ - Example:                                                      + Example:                                                    diff --git a/ansi/testdata/TestRendererIssues/48.golden b/ansi/testdata/TestRendererIssues/48.golden index d62cf8ba..a20338ce 100644 --- a/ansi/testdata/TestRendererIssues/48.golden +++ b/ansi/testdata/TestRendererIssues/48.golden @@ -1,17 +1,17 @@ - emoji in text                                                                  -                                                                                - 🐙 ⚡ 🐱 = ❤️                                                                  -                                                                                - emoji in header                                                                -                                                                                - ## 🐙 ⚡ 🐱 = ❤️                                                               -                                                                                - no emoji in code blocks                                                        -                                                                                -   :octopus: :zap: :cat: = :heart:                                              -                                                                                - no emoji in inline code                                                        -                                                                                -  :octopus: :zap: :cat: = :heart:                                               + emoji in text                                                                +                                                                              + 🐙 ⚡ 🐱 = ❤️                                                                +                                                                              + emoji in header                                                              +                                                                              + ## 🐙 ⚡ 🐱 = ❤️                                                             +                                                                              + no emoji in code blocks                                                      +                                                                              +   :octopus: :zap: :cat: = :heart:                                            +                                                                              + no emoji in inline code                                                      +                                                                              +  :octopus: :zap: :cat: = :heart:                                             diff --git a/ansi/testdata/TestRendererIssues/60.golden b/ansi/testdata/TestRendererIssues/60.golden index e7017ce0..c9c8688a 100644 --- a/ansi/testdata/TestRendererIssues/60.golden +++ b/ansi/testdata/TestRendererIssues/60.golden @@ -1,28 +1,28 @@ -                                                                                - Library │Version - ──────────────────────────────────────────────────────────────┼─────────────── - ESMF https://github.com/esmf-org/esmf │v8.6.1 - FMS https://github.com/NOAA-GFDL/FMS/ │2024.01.02 - netCDF https://github.com/Unidata/netcdf-c │4.9.2 - netCDF Fortran https://github.com/Unidata/netcdf-fortran │4.6.1 - netCDF C++ https://github.com/Unidata/netcdf-cxx4 │4.3.1 - HDF5 https://portal.hdfgroup.org/display/support │1.10.11 - HDF4 https://portal.hdfgroup.org/display/support │4.2.16-2 - GFE https://github.com/Goddard-Fortran-Ecosystem/GFE │v1.16.0 - xgboost https://github.com/dmlc/xgboost │v1.6.0 - libyaml https://github.com/yaml/libyaml.git │0.2.5 - antlr2 https://www.antlr2.org/ │2.7.7 - GSL https://www.gnu.org/software/gsl/ │2.7 - jpeg http://www.ijg.org/ │9e - zlib http://www.zlib.net/ │1.3.1 - szip https://support.hdfgroup.org/doc_resource/SZIP/ │2.1.1 - cURL https://curl.haxx.se/ │8.8.0 - UDUNITS2 https://github.com/GMAO-SI-Team/UDUNITS-2.git │2.2.28 - NCO http://nco.sourceforge.net/ │5.2.6 - CDO https://code.mpimet.mpg.de/projects/cdo │2.3.0 - nccmp https://gitlab.com/remikz/nccmp │1.9.1.0 - HDF-EOS2 https://wiki.earthdata.nasa.gov/display/DAS │3.0 - HDF-EOS5 https://wiki.earthdata.nasa.gov/display/DAS │2.0 - SDP Toolkit https://wiki.earthdata.nasa.gov/display/DAS │5.2.20 +                                                                              + Library │Version + ─────────────────────────────────────────────────────────────┼────────────── + ESMF https://github.com/esmf-org/esmf │v8.6.1 + FMS https://github.com/NOAA-GFDL/FMS/ │2024.01.02 + netCDF https://github.com/Unidata/netcdf-c │4.9.2 + netCDF Fortran https://github.com/Unidata/netcdf-fortran │4.6.1 + netCDF C++ https://github.com/Unidata/netcdf-cxx4 │4.3.1 + HDF5 https://portal.hdfgroup.org/display/support │1.10.11 + HDF4 https://portal.hdfgroup.org/display/support │4.2.16-2 + GFE https://github.com/Goddard-Fortran-Ecosystem/GFE │v1.16.0 + xgboost https://github.com/dmlc/xgboost │v1.6.0 + libyaml https://github.com/yaml/libyaml.git │0.2.5 + antlr2 https://www.antlr2.org/ │2.7.7 + GSL https://www.gnu.org/software/gsl/ │2.7 + jpeg http://www.ijg.org/ │9e + zlib http://www.zlib.net/ │1.3.1 + szip https://support.hdfgroup.org/doc_resource/SZIP/ │2.1.1 + cURL https://curl.haxx.se/ │8.8.0 + UDUNITS2 https://github.com/GMAO-SI-Team/UDUNITS-2.git │2.2.28 + NCO http://nco.sourceforge.net/ │5.2.6 + CDO https://code.mpimet.mpg.de/projects/cdo │2.3.0 + nccmp https://gitlab.com/remikz/nccmp │1.9.1.0 + HDF-EOS2 https://wiki.earthdata.nasa.gov/display/DAS │3.0 + HDF-EOS5 https://wiki.earthdata.nasa.gov/display/DAS │2.0 + SDP Toolkit https://wiki.earthdata.nasa.gov/display/DAS │5.2.20 diff --git a/ansi/testdata/TestRendererIssues/79.golden b/ansi/testdata/TestRendererIssues/79.golden index 18de03c8..23b0f168 100644 --- a/ansi/testdata/TestRendererIssues/79.golden +++ b/ansi/testdata/TestRendererIssues/79.golden @@ -1,9 +1,9 @@ - Preceding blockquote paragraph                                                 -                                                                                - │ 1st blockquote paragraph                                                     - │                                                                              - │   quoted code block                                                          - │                                                                              - │ 2nd blockquote paragraph                                                     + Preceding blockquote paragraph                                               +                                                                              + │ 1st blockquote paragraph                                                   + │                                                                            + │   quoted code block                                                        + │                                                                            + │ 2nd blockquote paragraph                                                   diff --git a/testdata/TestCapitalization.golden b/testdata/TestCapitalization.golden index d5925502..2c684356 100644 --- a/testdata/TestCapitalization.golden +++ b/testdata/TestCapitalization.golden @@ -1,7 +1,7 @@ -  EVERYTHING IS UPPERCASE                                                       -                                                                                - ## Everything Is Titled                                                        -                                                                                - ### everything is lowercase                                                    +  EVERYTHING IS UPPERCASE                                                     +                                                                              + ## Everything Is Titled                                                      +                                                                              + ### everything is lowercase                                                   diff --git a/testdata/TestRenderHelpers.golden b/testdata/TestRenderHelpers.golden index 260ca1d1..e598ccaa 100644 --- a/testdata/TestRenderHelpers.golden +++ b/testdata/TestRenderHelpers.golden @@ -1,39 +1,40 @@ -  Gold                                                                          -                                                                                - 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.             -                                                                                - ## Usage                                                                       -                                                                                - 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!    -                                                                                - ## Colors                                                                      -                                                                                - 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:                               -                                                                                -   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!            +  Gold                                                                        +                                                                              + 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.      +                                                                              + ## Usage                                                                     +                                                                              + 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!  +                                                                              + ## Colors                                                                    +                                                                              + 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:                             +                                                                              +   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!                                                                      diff --git a/testdata/TestTermRenderer.golden b/testdata/TestTermRenderer.golden index 260ca1d1..e598ccaa 100644 --- a/testdata/TestTermRenderer.golden +++ b/testdata/TestTermRenderer.golden @@ -1,39 +1,40 @@ -  Gold                                                                          -                                                                                - 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.             -                                                                                - ## Usage                                                                       -                                                                                - 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!    -                                                                                - ## Colors                                                                      -                                                                                - 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:                               -                                                                                -   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!            +  Gold                                                                        +                                                                              + 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.      +                                                                              + ## Usage                                                                     +                                                                              + 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!  +                                                                              + ## Colors                                                                    +                                                                              + 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:                             +                                                                              +   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!                                                                      diff --git a/testdata/TestTermRendererWriter.golden b/testdata/TestTermRendererWriter.golden index 260ca1d1..e598ccaa 100644 --- a/testdata/TestTermRendererWriter.golden +++ b/testdata/TestTermRendererWriter.golden @@ -1,39 +1,40 @@ -  Gold                                                                          -                                                                                - 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.             -                                                                                - ## Usage                                                                       -                                                                                - 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!    -                                                                                - ## Colors                                                                      -                                                                                - 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:                               -                                                                                -   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!            +  Gold                                                                        +                                                                              + 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.      +                                                                              + ## Usage                                                                     +                                                                              + 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!  +                                                                              + ## Colors                                                                    +                                                                              + 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:                             +                                                                              +   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!