markor
markor copied to clipboard
ShareInto: Pipe ("|") in text association breaks GitHub Markdown for links
⚠️ This issue respects the following points: ⚠️
- [X] This is a bug. Not a question or feature request.
- [X] The topic is not already reported at Issues. (I've searched it).
- [X] Markor is up to date. See Releases for the latest version. Updates are available from F-Droid and GitHub.
- [X] 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
- Google Chrome: goto https://www.livescience.com/stonehenge-england-ancient-history
- Click on the three horizontal dots on the top roght
- Copy the date "October 9, 2023" to the clipboard.
- Select "Share"
- Choose "Markor"
- Enter newline after the link for a blank line
- Paste the date on the blank line
- 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
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?
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.
Ok. I see where this used to be
https://github.com/gsantner/markor/blob/v2.11.0/app/src/main/java/net/gsantner/markor/activity/DocumentShareIntoFragment.java#L421
I'll fix it soon.
Thank you.
Is escaping the pipe sufficient? I.e. \|
That works; past precedence used /. Whichever way is best for the project.
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 |
This is now fixed in #2307
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
Replacing pipe with slash and that in reformatted links only - sounds good. Having escaped pipe looks worse to me