Link wrapping calculates line width using incorrect text style
- Dominant language
- Java
- Stars
- 6.1k
- Forks
- 537
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 4
Description
### ⚠️ This issue respects the following points: ⚠️
- [x] This is a **bug**. Not a [question or feature request](https://github.com/gsantner/markor/issues/new/choose).
- [x] The topic is **not** already reported at [Issues](https://github.com/gsantner/markor/issues?q=#js-issues-search). _(I've searched it)_.
- [x] Markor **is** up to date. See [Releases](https://github.com/gsantner/markor/tags) for the latest version. Updates are available from [F-Droid](https://f-droid.org/en/packages/net.gsantner.markor/) and GitHub.
- [x] The bug is still present in the latest development version (git master). (Please [download](https://nightly.link/gsantner/markor/workflows/build-android-project/master) 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
Links are wrapped not at the right border of the screen.
Looks like normal text style is used to calculate position at which text should be wrapped, though link is shown is different style with smaller font.
### Steps to reproduce
1. In markdown or zim wiki file create new line with long URL, for instance https://theconversation.com/openai-has-deleted-the-word-safely-from-its-mission-and-its-new-structure-is-a-test-for-whether-ai-serves-society-or-shareholders-274467
2. observe it gets wrapped some distance from the right border of the screen

In this example I pasted the same link twice, the second time replacing first letter ("h") with "n" so it becomes essentially the same string but not recognized as URL and displayed in normal text style. Looks like URL is wrapped at the same positions at which it would be wrapped if it was displayed with normal text style
### Information
Android version:
Device: Google Pixel 6a
App Version: 2.15.2
### Source
F-Droid
### Format / File type
Not specific
### Additional info / Log
```shell
-
```
Contributor guide
No contributing guide indexed for this repository
Research direction
No source file, test, or entry point is named. Reproduce the long-URL case in a Markdown or Zim wiki file, then trace the editor's link rendering and line-wrapping behavior. Done means links wrap at the right screen border using the style in which they are displayed, with the reported plain-text comparison still behaving correctly.
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
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100