-
Notifications
You must be signed in to change notification settings - Fork 184
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
Wrapped hyperlinks are broken #149
Comments
Upon closer examination, it appears this issue is within glamour, not glow, and has been identified already. I did some further digging into fixing things and solving it potentially with json styling, but unfortunately this doesn't work. I believe this issue should be moved to glamour. It is similar to glamour#114 although that is a feature request for anchor style hyperlinks, while this pertains more to the github cli issue in that a forced text wrap by glamour breaks links. |
unfortunately not sure if we can do something about this :/ |
* wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip * wip * wip * fix: autolink closes #290 * fix: escape characters closes #106 closes #274 closes #311 * fix: table * ci: golangci lint update * feat: use x/golden * test: #106 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #290 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #312 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #257 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #149 * fix: #239 * feat: use lipgloss table closes #262 Co-authored-by: bashbunni <bunni@bashbunni.dev> * fix: codespan is not a block * test: #315 * test: #316 * fix: #316 * test: table * fix: codespans, tables * test: table * test: #117 * test: #60 * fix: rm stylewriter * fix: #313 * fix: margin * fix: blocks and word wrap * fix: build Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: gitattributes * fix: test opt Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: stable lipgloss Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: double styles * fix: tables * fix: tables --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> Co-authored-by: bashbunni <bunni@bashbunni.dev>
* wip Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * wip * wip * wip * fix: autolink closes #290 * fix: escape characters closes #106 closes #274 closes #311 * fix: table * ci: golangci lint update * feat: use x/golden * test: #106 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #290 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #312 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #257 Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * test: #149 * fix: #239 * feat: use lipgloss table closes #262 Co-authored-by: bashbunni <bunni@bashbunni.dev> * fix: codespan is not a block * test: #315 * test: #316 * fix: #316 * test: table * fix: codespans, tables * test: table * test: #117 * test: #60 * fix: rm stylewriter * fix: #313 * fix: margin * fix: blocks and word wrap * fix: build Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * chore: gitattributes * fix: test opt Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: stable lipgloss Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> * fix: double styles * fix: tables * fix: tables --------- Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com> Co-authored-by: bashbunni <bunni@bashbunni.dev>
When a link that is too long is passed into glow, the resulting link breaks into a new line, which in turn breaks the link. For example, this link, when clicked, takes me to https://github.com/ValveSoftware/steam-for- which is the part of the link on its own line:
Making the wrap length extremely long causes the URL to wrap on its own and then still functions as a valid link:
Another fix for this, which I believe better matches the markdown hyperlink style, would be to implement something like the escape code method proposed in charmbracelet/glow#237. This method also survives when going through a line break/text wrap:
The text was updated successfully, but these errors were encountered: