Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL's not working correctly #1

Closed
keesse opened this issue Aug 3, 2024 · 22 comments
Closed

URL's not working correctly #1

keesse opened this issue Aug 3, 2024 · 22 comments

Comments

@keesse
Copy link

keesse commented Aug 3, 2024

Hi ralsina,

I just build markterm and it works fine, so thanks!
However when clicking on the shown URL's in the terminal, I get a 404, this is because there is a ">" added, when I remove this, I get the correct page.
E.g. https://github.com/charmbracelet/glow%3E

Regards,

kees

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

Thanksfor the report, I'll take a look!

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

They seem to be working for me right now, maybe I fixed it at some point :-D

Could you check with the latest code from main? If that works I will make another release.

@keesse
Copy link
Author

keesse commented Aug 26, 2024 via email

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

Ok, pushed a new release of tartrazine and a new commit in markterm, this combination should work :-)

@keesse
Copy link
Author

keesse commented Aug 26, 2024

Unfortunately not

markterm on  main is 📦 v0.3.0 via 🔮 v1.13.2 took 2m31s
❯ git pull origin main
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (1/1), done.
remote: Total 3 (delta 2), reused 3 (delta 2), pack-reused 0 (from 0)
Unpacking objects: 100% (3/3), 333 bytes | 333.00 KiB/s, done.
From https://github.com/ralsina/markterm

  • branch main -> FETCH_HEAD
    f69a123..7d5a142 main -> origin/main
    Updating f69a123..7d5a142
    Fast-forward
    shard.yml | 1 +
    1 file changed, 1 insertion(+)

markterm on  main is 📦 v0.3.0 via 🔮 v1.13.2
❯ make
shards build -Dstrict_multi_assign -Dno_number_autocast
Resolving dependencies
Fetching https://github.com/icyleaf/markd.git
Fetching https://github.com/chenkovsky/docopt.cr.git
Fetching https://github.com/ralsina/tartrazine.git
Fetching https://github.com/ralsina/sixteen.git
Fetching https://github.com/schovi/baked_file_system.git
Fetching https://github.com/crystal-china/base58.cr.git
Unable to satisfy the following requirements:

  • sixteen (branch main) required by shard.yml
  • sixteen (0.3.0) required by shard.lock
  • sixteen (*) required by tartrazine 0.6.1
    Failed to resolve dependencies
    make: *** [Makefile:2: build] Error 1

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

remove your lib/ and shard.lock first

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

And sorry about all the complications, but hey, you are AFAIK the second person to try this :-D

@keesse
Copy link
Author

keesse commented Aug 26, 2024

Removing the shard.lock did it, I could build.
However from the terminal I am using Hyper gave the same problem, I then tried Warp, that worked!
Tried the standard Linux Mint Terminal, that gave errors, also Terminator, appearingly they do not support links

markterm on  main is 📦 v0.3.0 via 🔮 v1.13.2
❯ bin/markterm README.md
Unhandled exception: Missing ENV key: "TERM_PROGRAM" (KeyError)
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/env.cr:57:7 in 'fetch'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/env.cr:22:5 in '[]'
from src/terminal.cr:8:8 in 'supports_links?'
from src/markterm.cr:183:14 in 'text'
from lib/markd/src/markd/renderer.cr:92:13 in 'render'
from src/markterm.cr:203:7 in 'render'
from src/markterm.cr:212:5 in 'to_term:theme:code_theme'
from src/main.cr:21:8 in 'main'
from src/main.cr:32:1 in '__crystal_main'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:118:5 in 'main_user_code'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:104:7 in 'main'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:130:3 in 'main'
from /lib/x86_64-linux-gnu/libc.so.6 in '??'
from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
from bin/markterm in '_start'
from ???

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

Ok, the support for html-style links in different terminals is ... spotty?

I tried it in kitty and alacritty, will check on a few of the ones you mentioned.

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

I tried hyper. Markterm is not even trying to do links in it!

What hyper does is recognize URL patterns but it reads <https://foo.com> as a link to https://foo.com> which is different from any other terminal.

For terminator (and probably other VTE based terminals) it´s a bug in markterm I can fix tonight

You have been really helpful dude!

@ralsina
Copy link
Owner

ralsina commented Aug 26, 2024

Fixed in master for terminator (and probbaly for mint too)

For hyper I created an issue because it looks like a bug: vercel/hyper#8031

If you find any other weird behaviour just open another issue.

@keesse
Copy link
Author

keesse commented Aug 27, 2024

A shard version issue with tartrazine (I did remove shard.lock)

markterm on  main is 📦 v0.3.0 via 🔮 v1.13.2
❯ git pull origin main
remote: Enumerating objects: 27, done.
remote: Counting objects: 100% (27/27), done.
remote: Compressing objects: 100% (10/10), done.
remote: Total 21 (delta 12), reused 20 (delta 11), pack-reused 0 (from 0)
Unpacking objects: 100% (21/21), 3.56 KiB | 145.00 KiB/s, done.
From https://github.com/ralsina/markterm

  • branch main -> FETCH_HEAD
    7d5a142..c4617e3 main -> origin/main
    Updating 7d5a142..c4617e3
    Fast-forward
    .pre-commit-config.yaml | 35 +++++++++++++++++++++++++++++++++++
    CHANGELOG.md | 5 +++++
    Makefile | 16 ++++++++++++++++
    README.md | 9 ++++-----
    cliff.toml | 79 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    shard.yml | 2 +-
    src/terminal.cr | 2 +-
    7 files changed, 141 insertions(+), 7 deletions(-)
    create mode 100644 .pre-commit-config.yaml
    create mode 100644 CHANGELOG.md
    create mode 100644 cliff.toml

markterm on  main is 📦 v0.3.1 via 🔮 v1.13.2
❯ make
shards build -Dstrict_multi_assign -Dno_number_autocast
Resolving dependencies
Fetching https://github.com/chenkovsky/docopt.cr.git
Fetching https://github.com/ralsina/tartrazine.git
Fetching https://github.com/ralsina/sixteen.git
Fetching https://github.com/icyleaf/markd.git
Fetching https://github.com/ralsina/baked_file_system.git
Fetching https://github.com/crystal-china/base58.cr.git
Shard "tartrazine" version (0.6.1) doesn't match tag version (0.6.3)
Using markd (0.5.0)
Using baked_file_system (0.10.0 at beb3731)
Using base58 (0.1.0 at 2b0564a)
Installing sixteen (0.3.0 at b133e02)
Using docopt (0.2.0 at 620fce4)
Using tartrazine (0.6.3)
Writing shard.lock
Building: markterm

markterm on  main is 📦 v0.3.1 via 🔮 v1.13.2 took 12s
❯ ll bin
totaal 8128
drwxrwxr-x 2 kees kees 0 aug 27 16:39 .
drwxrwxr-x 7 kees kees 0 aug 27 16:38 ..
-rwxrwxr-x 1 kees kees 6420160 aug 27 16:39 markterm

markterm on  main is 📦 v0.3.1 via 🔮 v1.13.2
❯ bin/markterm README.md
Unhandled exception: Unknown lexer: docopt (Exception)
from lib/tartrazine/src/lexer.cr:30:5 in 'lexer_by_name'
from lib/tartrazine/src/lexer.cr:13:12 in 'lexer'
from src/terminal.cr:99:13 in 'highlight'
from src/markterm.cr:63:16 in 'code_block'
from lib/markd/src/markd/renderer.cr:70:13 in 'render'
from src/markterm.cr:203:7 in 'render'
from src/markterm.cr:212:5 in 'to_term:theme:code_theme'
from src/main.cr:21:8 in 'main'
from src/main.cr:32:1 in '__crystal_main'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:118:5 in 'main_user_code'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:104:7 in 'main'
from /home/kees/.asdf/installs/crystal/1.13.2/share/crystal/src/crystal/main.cr:130:3 in 'main'
from /lib/x86_64-linux-gnu/libc.so.6 in '??'
from /lib/x86_64-linux-gnu/libc.so.6 in '__libc_start_main'
from bin/markterm in '_start'
from ???

@ralsina
Copy link
Owner

ralsina commented Aug 27, 2024

The warning is harmless.

I'll do a fix for the error tonight.

@ralsina
Copy link
Owner

ralsina commented Aug 27, 2024

Version 0.3.2 with the fix is now out.

@ralsina ralsina closed this as completed Aug 27, 2024
@keesse
Copy link
Author

keesse commented Aug 27, 2024

I did a pull and the Makefile disappeared!
Copied it from an old directory and could build.
The build indeed worked in the Mint Terminal and Terminator with Ctrl+Left mouse button, like you wrote not in Hyper

markterm on  main is 📦 v0.3.1 via 🔮 v1.13.2
❯ git pull origin main
remote: Enumerating objects: 36, done.
remote: Counting objects: 100% (36/36), done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 28 (delta 17), reused 27 (delta 16), pack-reused 0 (from 0)
Unpacking objects: 100% (28/28), 3.56 KiB | 113.00 KiB/s, done.
From https://github.com/ralsina/markterm

  • branch main -> FETCH_HEAD
    c4617e3..8b88a5c main -> origin/main
    Updating c4617e3..8b88a5c
    Fast-forward
    .gitignore | 1 +
    CHANGELOG.md | 22 ++++++++++++++++++++++
    Hacefile.yml | 91 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    Makefile | 23 -----------------------
    README.md | 1 +
    build_static.sh | 4 ++--
    do_release.sh | 15 +++++++++++++++
    shard.yml | 6 +++++-
    src/terminal.cr | 6 +++++-
    9 files changed, 142 insertions(+), 27 deletions(-)
    create mode 100644 Hacefile.yml
    delete mode 100644 Makefile
    create mode 100755 do_release.sh

@ralsina
Copy link
Owner

ralsina commented Aug 27, 2024 via email

@keesse
Copy link
Author

keesse commented Aug 28, 2024 via email

@ralsina
Copy link
Owner

ralsina commented Aug 28, 2024 via email

@ralsina
Copy link
Owner

ralsina commented Aug 28, 2024

It was a one-liner and I have automated releases, so just did a quick one now, remember to use less -R so it shows color.

@keesse
Copy link
Author

keesse commented Aug 30, 2024 via email

@ralsina
Copy link
Owner

ralsina commented Aug 30, 2024 via email

@keesse
Copy link
Author

keesse commented Aug 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants