SeattleTestbed / docs

Documentation for Seattle Testbed (scroll down for README)
MIT License
40 stars 164 forks source link

`tractomd` triple single-quote problem #9

Closed aaaaalbert closed 8 years ago

aaaaalbert commented 8 years ago

The Trac-to-Markdown conversion script doesn't convert bold correclty: Input: '''This''' should be '''bold''', but '''it''' still isn't quite. Output: '''This''' should be **bold''', but '''it** still isn't quite.

The problem seems to be that triple single-quotes must be prefixed and suffixed by a space for the current regex to work.

The bold/italic regexes also add a leading/trailing space to the Markdown rendition of emphasized words.

lukpueh commented 8 years ago

Easy to fix, just use negative lookbehind assertion. The space hack was initially introduced to prevent two urls on a line from being italicized. E.g. "http://this.is.not.italic http://got.it" --> "http:this.is.not.italic http:got.it" PR #11 fixes these problems.