Fossil

Check-in [dd41f85a]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix by Natacha Porté for delimiter escape bug discovered by Mark Janssen. (fossil-users list)
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:dd41f85acf57290aba64c1f42ddeafcdf80432df80a07cea699bbb7456ff1386
User & Date: jan.nijtmans 2017-03-14 16:02:57
Original Comment: Fix by Matacha Porté for delimiter escape bug discovered by Mark Janssen. (fossil-users list)
Context
2017-03-14
20:21
New test case for the Markdown bug, fixed issues with hash matching, fixed tests for the TH1 unversioned command so they no longer depend on unversioned files from a past release in the real repository. check-in: f92672bd user: rberteig tags: trunk
16:02
Fix by Natacha Porté for delimiter escape bug discovered by Mark Janssen. (fossil-users list) check-in: dd41f85a user: jan.nijtmans tags: trunk
14:38
Fix build on mingw-w64 (which DOES have strtok_r) check-in: 6f523169 user: jan.nijtmans tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/markdown.c.

457
458
459
460
461
462
463
464
465
466
467
468
469
470


471
472
473
474
475
476
477
/* find_emph_char -- looks for the next emph char, skipping other constructs */
static size_t find_emph_char(char *data, size_t size, char c){
  size_t i = 1;

  while( i<size ){
    while( i<size && data[i]!=c && data[i]!='`' && data[i]!='[' ){ i++; }
    if( i>=size ) return 0;
    if( data[i]==c ) return i;

    /* not counting escaped chars */
    if( i && data[i-1]=='\\' ){
      i++;
      continue;
    }



    /* skipping a code span */
    if( data[i]=='`' ){
      size_t span_nb = 0, bt;
      size_t tmp_i = 0;

      /* counting the number of opening backticks */







<






>
>







457
458
459
460
461
462
463

464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
/* find_emph_char -- looks for the next emph char, skipping other constructs */
static size_t find_emph_char(char *data, size_t size, char c){
  size_t i = 1;

  while( i<size ){
    while( i<size && data[i]!=c && data[i]!='`' && data[i]!='[' ){ i++; }
    if( i>=size ) return 0;


    /* not counting escaped chars */
    if( i && data[i-1]=='\\' ){
      i++;
      continue;
    }

    if( data[i]==c ) return i;

    /* skipping a code span */
    if( data[i]=='`' ){
      size_t span_nb = 0, bt;
      size_t tmp_i = 0;

      /* counting the number of opening backticks */