Gozala / Gozala/wiky

Found a small bug in abbr regex

Open
#1 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
7
Forks
2
PR merge metrics
No merged PRs in 30d

Description

The regular expression for abbrivitations is too greedy.

``` javascript
{ rex:/\?([^ \t\f\v\xB6]+)\((.+)\)\?/g, tmplt:"$1" }, // .. abbreviation ..
```

Try this in wikybox (http://goessner.net/articles/wiky/WikyBox.html):
?test(first)? ?test(second)?

will be fine if you change the regex to:

``` javascript
{ rex:/\?([^ \t\f\v\xB6]+)\((.+?)\)\?/g, tmplt:"$1" }, // .. abbreviation ..
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.