PiRSquared17 / wikiwym

Automatically exported from code.google.com/p/wikiwym
0 stars 0 forks source link

'*' is being evaluated inside `` blocks #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hi!

i did some quick testing before i have to go to work this morning and i 
found two minor bugs:

a) Inside of `` blocks a '*' is still treated as bold.

b) _Underline_ support seems to be missing.

i'm attaching a file which demonstrates this.

Aside from those minor things, the parser does an excellent job on the 
pages i've tried so far.

:)

Original issue reported on code.google.com by sgbeal@googlemail.com on 20 Apr 2010 at 9:08

Attachments:

GoogleCodeExporter commented 9 years ago
Point (a) apparently doesn't happen in all cases. Here's an example which 
demonstrates a working and non-working case:

----------------- begin wiki

  * (`void *`). This cannot work for the general case. v8 allows us to do it, but 
dereferencing the object in JS will cause a crash, and the 100% lack of 
type-safety 
would eventually lead to crashes when the objects travel between JS and native 
and 
someone passes the wrong (`void*`) somewhere.
  * (`[const] char *`) can be used, but have some notable limitations. See below for 
more details.

----------------- end wiki

Original comment by sgbeal@googlemail.com on 20 Apr 2010 at 9:21

GoogleCodeExporter commented 9 years ago
i've narrowed it down, but i have to go to work so i can't look at the code now:

Broken: (`void *`)
Works: (`void*`)

the extra space makes a difference here.

Original comment by sgbeal@googlemail.com on 20 Apr 2010 at 9:23

GoogleCodeExporter commented 9 years ago
And before i finally go to work: underlining DOES work, but underline and bold 
do not 
work together:

OK: _underline_, *bold*
Not ok: _*this*_ (==underlined "*this*")
Not ok: *_this_* (==bold "_this_")

Original comment by sgbeal@googlemail.com on 20 Apr 2010 at 9:26

GoogleCodeExporter commented 9 years ago
This now "mostly" works in the GoogleCodeWikiParser code:

`void * const *` is broken: it resolves to <tt>void const</tt>. i understand 
why, 
though.

i've decided to rewrite the parser to traverse the document char by char, as 
that's 
the only reliable way to work around corner cases like this.

Original comment by sgbeal@googlemail.com on 21 Apr 2010 at 9:26

GoogleCodeExporter commented 9 years ago

Original comment by sgbeal@googlemail.com on 21 Apr 2010 at 9:26

GoogleCodeExporter commented 9 years ago
This is implemented in GoogleCodeWikiParser.

Original comment by sgbeal@googlemail.com on 21 Apr 2010 at 10:05