v2.12.5 Zim format parser breaks on links with $NAMES with java.lang.IllegalArgumentException
Nobody has claimed this yet.
- 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
Trying to view such file:
```
Content-Type: text/x-zim-wiki
Wiki-Format: zim 0.6
Creation-Date: 2000-12-05T16:35:28+03:00
[[https://github.com/b3nj5m1n/xdg-ninja|b3nj5m1n/xdg-ninja: A shell script which checks your $HOME for unwanted files and directories.]]
```
Gives an error:
> Please report at project issue tracker: java.lang.IllegalArgumentException: Illegal group reference
### Steps to reproduce
1. Create zim file
2. Put a link in it with $FOOBAR in title. E.g.: `[[https://google.com|This is $FOOBAR]]`
3. View file via Markor
### Information
Android version: Irrelevant
Device: Irrelevant
App Version: v2.12.5
### Source
F-Droid
### Format / File type
Wikitext, Zim
### Additional info / Log
```shell
-
```
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the crash by opening a Zim file containing a link title with a value such as $FOOBAR, then trace the Zim/Wikitext parsing path used by Markor. Done means the file opens without IllegalArgumentException and the link title is displayed correctly; add a regression test if the parser's test location is found.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, java
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100