gsantner / gsantner/markor

Please don't render ' as ’‘ in View mode 👁️

Open
#2,819 11 comments 2 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
6.1k
Forks
537
Avg merge
1d 18h
Merged PRs (30d)
4

Description

# IMPORTANT
* App version: 2.16.1
* Android version/rom: 11
* Device: Moto G9 Play
* I accept that this issue will be closed without further notice in case I didn't describe the problem including general information, or didn't [search](https://github.com/gsantner/markor/issues?q=) for similar issues & [requests](https://github.com/gsantner/markor/discussions?discussions_q=).

## Explain the Problem
Whenever I create a codeblock ` ` using the two of the ` symbol, any single quotes ' inside are rendered as ’‘ in View mode 👁️.
This problematic because I want to copy script snippets from Markor and paste them in Termux, but ’‘ aren't valid script characters.
I wish that Markor didn't render ' as anything other than ', just like VS Code and GitHub render ' as ' in the view mode of .md files.

## Steps to Reproduce
If you paste `` `/system/bin/dumpsys deviceidle 2>/dev/null | awk -F'=' '/mNetworkConnected=/ {print $2; exit}'` `` in Markor, its View mode will replace ' with ’‘ and look like this:
`/system/bin/dumpsys deviceidle 2>/dev/null | awk -F’=’ ‘/mNetworkConnected=/ {print $2; exit}’` which fails in Termux.

GitHub, VS Code and every Markdown rendering app I ever came across keep ' as it is so it correctly renders like this:
`/system/bin/dumpsys deviceidle 2>/dev/null | awk -F'=' '/mNetworkConnected=/ {print $2; exit}'`

Note: you don't need to check that this line actually works in Termux. I'm only asking that you check that it renders '' correctly instead of ’‘.
If for whatever reason you wish to actually check that this line works in Termux,
it requires that you enter the following line just once in ADB Shell: `pm grant com.termux android.permission.DUMP`
OR this line in Termux with rish and Shizuku on: `rish -c "pm grant com.termux android.permission.DUMP"`.
This line checks if there's any internet connection, by WiFi, Cellular Mobile Data or both, if you're curious.

Contributor guide

No contributing guide indexed for this repository

Research direction

No source file or test is named. Start from Markor's Android View mode and reproduce the supplied Markdown code block containing single quotes; done means the rendered code preserves each ' character exactly so the copied script remains valid.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
mobile-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.