After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353018 - Regular expressions for *bold*, /italic/, _underline_ match incorrectly
Regular expressions for *bold*, /italic/, _underline_ match incorrectly
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-1.0 betas
Other All
: Normal trivial
: 1.0
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2006-08-26 19:12 UTC by Benjamin Esham
Modified: 2006-08-27 04:02 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Benjamin Esham 2006-08-26 19:12:55 UTC
The regular expression used internally by Pan to find *bold*, /italic/, and _underlined_ text often matches incorrectly.  For example, portions of the following all match, but shouldn't:

- Look in /usr/local/lib for the file.
- I'm using PHP/Apache/MySQL.

Here's a regex I use for italicization in Vim:

  \s/[^/]\+/[ .!?:;]

This ensures that there is whitespace before the initial slash and whitespace or some kind of punctuation after the second slash.  This might still benefit from some further refinement, but won't be caught by e.g. UNIX-style paths.
Comment 1 Charles Kerr 2006-08-27 04:02:19 UTC
Fixed in the development version. The fix will be available in the next major release. Thank you for your bug report.