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

ShareInto: Pipe ("|") in text association breaks GitHub Markdown for links #2308

Closed
4 tasks done
RalphHightower opened this issue May 26, 2024 · 10 comments · Fixed by #2307
Closed
4 tasks done

ShareInto: Pipe ("|") in text association breaks GitHub Markdown for links #2308

RalphHightower opened this issue May 26, 2024 · 10 comments · Fixed by #2307

Comments

@RalphHightower
Copy link

⚠️ This issue respects the following points: ⚠️

  • This is a bug. Not a question or feature request.
  • The topic is not already reported at Issues. (I've searched it).
  • Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
  • The bug is still present in the latest development version (git master). (Please download and try the test version of Markor, named Marder. Don't worry; Markor and Marder appear as completely separate applications. You can install both side-by-side, and Markor settings are not touched. In case the issue is resolved there, you don't need to create a bug report. The change will be part of the next Markor update.)

Description

The pipe in the descriptive text for links where the site name becomes part of the description breaks the GitHub Markdown for lins. Example of what would be from LiveScience: ArticleTitle / LiveScience. In the additional info/logs, I included a table that compares 2.12.2 to 2.11.0.
V2.12.2 looks fine in Markor, but it breaks when uploaded to GitHub.

Steps to reproduce

  1. Google Chrome: goto https://www.livescience.com/stonehenge-england-ancient-history
  2. Click on the three horizontal dots on the top roght
  3. Copy the date "October 9, 2023"
    to the clipboard.
  4. Select "Share"
  5. Choose "Markor"
  6. Enter newline after the link for a blank line
  7. Paste the date on the blank line
  8. Copy to QuickLinks

Information

Android version: 14 (5.10.198-android12-9-28575149-abS908USQS5EXE2 #1 SMP PREEMPT Fri May 10 18:42:43 UTC 2024)
Device: Samsung Galaxy S22 Ultra (samsung SM-S908U)
App Version: v2.12.2

Source

Google Play

Format / File type

Markdown

Additional info / Log

I format the markdowns to add to tables. Below is a comparison of Markor versions. Table comparisons is on [RalphHightower/JekyllTestBed: Test Bed for Experimentation with Jekyll](https://github.com/RalphHightower/JekyllTestBed)

## Test to see if "|" inside text of link breaks the link.

| markor version | test | date |
|---|---|---|
| [Markor v2.11.0 (147\)](https://github.com/gsantner/markor/releases/tag/v2.11.0)[^21]  | [Where is Stonehenge, who built the prehistoric monument, and how? / Live Science](https://www.livescience.com/stonehenge-england-ancient-history) | October 9, 2023[^41] |
| [Markor v2.12.2 (code 151\)](https://github.com/gsantner/markor/releases/tag/v2.12.2)[^22] | [Where is Stonehenge, who built the prehistoric monument, and how? | Live Science](https://www.livescience.com/stonehenge-england-ancient-history) | October 9, 2023[^42] |

[^21]: \[Where is Stonehenge, who built the prehistoric monument, and how? / Live Science](https://www.livescience.com/stonehenge-england-ancient-history) \| October 9, 2023 \|<br />[Markor v2.11.0 (147\)](https://github.com/gsantner/markor/releases/tag/v2.11.0)

[^22]: \[Where is Stonehenge, who built the prehistoric monument, and how? \| Live Science](https://www.livescience.com/stonehenge-england-ancient-history) \| October 9, 2023 \|<br />[Markor v2.12.2 (code 151\)](https://github.com/gsantner/markor/releases/tag/v2.12.2)

[^41]: Success
[^42]: Failure
@harshad1
Copy link
Collaborator

harshad1 commented May 26, 2024

What is the desired behaviour here? Is there a standard for how to format link text?

Is this something that should be a filed as a bug against github?

@RalphHightower
Copy link
Author

Prior to v2.12, Markor put a slash in between the text of the link that separates it from the Site name. V2.12 changed the separation character to a pipe, which wrecks havoc with forming properly formatted links. I added a screenshot of the web page that I'm experimenting with. I can work around how v2.12 and v2.11 differ by changing the pipe to a slash before incorporating the links before use.

Screenshot_20240526_231325_Chrome

@harshad1
Copy link
Collaborator

@RalphHightower
Copy link
Author

Thank you.

@harshad1
Copy link
Collaborator

Is escaping the pipe sufficient? I.e. \|

@RalphHightower
Copy link
Author

That works; past precedence used /. Whichever way is best for the project.

@RalphHightower
Copy link
Author

RalphHightower commented May 28, 2024

A potential "gotcha". For this particular link, https://www.colorado.edu/today/2024/04/29/new-star-about-appear-night-sky-heres-how-catch-glimpse, Markor outputs the descriptive text with two pipes.

2024-05-31: I changed the above from two links to two pipes.

| A new star is about to appear in the night sky. Here’s how to catch a glimpse | CU Boulder Today | University of Colorado Boulder | April 29, 2024 |

@harshad1
Copy link
Collaborator

harshad1 commented Jun 1, 2024

This is now fixed in #2307

@harshad1
Copy link
Collaborator

harshad1 commented Jun 4, 2024

For reference. The pipe does not break links. It breaks table formatting in links. I am not sure if the 'fix' of replacing pipes with a slash is the right thing to do here.

Leaving this fix in as it was the historical behavior

@gsantner
Copy link
Owner

gsantner commented Jun 5, 2024

Replacing pipe with slash and that in reformatted links only - sounds good. Having escaped pipe looks worse to me

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

Successfully merging a pull request may close this issue.

3 participants