Closed Mikioni closed 12 years ago
Tested with example below, still got some problems after converted.
example : ====== Level 1 Headline ====== ===== Level 2 Headline ===== ==== Level 3 Headline ==== === Level 4 Headline === == Level 5 Headline ==
| Name | Address | | Name 2 | Address 2 |
output : ====== Level 1 Headline ====== ===== Level 2 Headline ===== ==== Level 3 Headline ==== === Level 4 Headline === == Level 5 Headline ==
{ | class="wikitable sortable" border=1 |
---|---|
Name | Address |
- | |
'''Name 2''' | '''Address 2''' |
- | |
} |
note : mediawiki's format : = Level 1 = == Level 2 == === Level 3 === ==== Level 4 ==== ===== Level 5 ===== ====== Level 6 ======
|| after Address and Address 2 should be removed in order to display correctly.
thank you for your continued reports. Together we will get this done!!!
headings and ordered list fixed: https://github.com/tstaerk/mediasyntax/commit/ce2817279af475badfa6a5dabb30c039c0b1e122
Tested, the headings look correct now, but double hash sign(#) and the ' || ' still there.
output : = Level 1 Headline = == Level 2 Headline == === Level 3 Headline === ==== Level 4 Headline ==== ===== Level 5 Headline =====
{ | class="wikitable sortable" border=1 | ||
---|---|---|---|
Name | Address | <--- the ' | ' (right hand side) shouldn't appear in order to display correctly |
- | |||
'''Name 2''' | '''Address 2''' | <--- the ' | ' (right hand side) shouldn't appear in order to display correctly |
- | |||
} |
Tested, table look ok now, problem with double hash sign(#) still there.
output : = Level 1 Headline = == Level 2 Headline == === Level 3 Headline === ==== Level 4 Headline ==== ===== Level 5 Headline =====
'#''#' [[DEMO Link]] <--- two hash (#) still there.
{ | class="wikitable sortable" border=1 |
---|---|
Name | Address |
- | |
'''Name 2''' | '''Address 2''' |
- | |
} |
I cannot reproduce that there are two hashes, there is one for me. I am using the testcase from mediasyntax/test/dokusyntax-test.txt
Strange, mine converted with two hashes. it will show the order list with two 1. 1. in mediawiki. :\
Mikioni,
I have added your testcase to mediasyntax' distribution. Please try the following:
/srv/www/htdocs/staerk/dokuwiki/lib/plugins/mediasyntax # php tools/dokuwiki2mediawiki.php test/dokusyntax-test.txt
and you should see ONE hash left of the [[DEMO Link]] Do you?
Tested, I found that putting a dash(-) in front of [[DEMO]] with no space/only one space will converted to one hash. but in dokuwiki there are two spaces before dash(-) for order list. so i think the problem is the converter can't convert to one hash because of two spaces in front.
example : '-' [[DEMO Link]] '-' [[DEMO Link]] '-' [[DEMO Lnki]]
output :
repost : because above comment will auto skip space, and display as bold for [[DEMO Link]]
Tested, I found that putting a dash(-) in front of [[DEMO]] with no space/only one space will converted to one hash. but in dokuwiki there are two spaces before dash(-) for order list. so i think the problem is the converter can't convert to one hash because of two spaces in front.
example : '-' [[DEMO Link]] <--- no space '-' [[DEMO Link]] <--- one space '-' [[DEMO Lnki]] <--- two spaces
output : '#' [[DEMO Link]] '#' [[DEMO Link]] '#''#' [[DEMO Link]]
Can you look at the test case https://github.com/tstaerk/mediasyntax/blob/master/test/dokusyntax-test.txt#L25 There I put two spaces, then one dash. And this gets converted to one hash for me. What if you convert this test case?
tested, Still get two hash(#)
output : this is ''italic''
This is a list '#''#' this is item 1 <--- separate with '' so that you can see the hashes.
{ | class="wikitable sortable" border=1 ! Car !! Colors !! Producer !! | |
---|---|---|
Audi A5 | black | VAG |
- | ||
::: | blue | ::: |
- | ||
::: | silver | ::: |
- | ||
::: | white | ::: |
- | ||
BMW 3 | blue | BMW |
- | ||
::: | white | ::: |
- | ||
::: | silver | ::: |
- | ||
} |
Now a table without headers follows: { | class="wikitable sortable" border=1 |
---|---|
col 1 | col 2 |
- | |
field 3 | 4 |
- | |
} |
= Level 1 Headline = == Level 2 Headline == === Level 3 Headline === ==== Level 4 Headline ==== ===== Level 5 Headline =====
'#''#' [[DEMO Link]] <--- separate with '' so that you can see the hashes.
{ | class="wikitable sortable" border=1 |
---|---|
Name | Address |
- | |
'''Name 2''' | '''Address 2''' |
- | |
} |
Added a special test case for this issue. Please git pull, then mediasyntax # php tools/dokuwiki2mediawiki.php test/issue9 output contains one hash for me. How many for you?
When git pull get this message " fatal: No remote repository specified. Please, specify either a URL or a remote name from which new revisions should be fetched. "
either this is an outage of github or you are not in the mediasyntax folder or you have not done git clone https://github.com/tstaerk/mediasyntax.git before
Tested, output with one hash now. Found another issue - converter will hang when trying to convert unorder list.
example : ====== Level 1 Headline ====== ===== Level 2 Headline ===== ==== Level 3 Headline ==== === Level 4 Headline === == Level 5 Headline ==
'-' [[DEMO Link]] '-' [[DEMO Link]] '-' [[DEMO Link]]
| Name | Address | | Name 2 | Address 2 |
' * ' New Line <--- will hang when this line is added. note: two space before star(*).
corrected, please update https://github.com/tstaerk/mediasyntax/commit/5ee1ed160c27ab041dcb19c476b2e71b6ab31a37
still got problem, converted to bold ?
output : = Level 1 Headline = == Level 2 Headline == === Level 3 Headline === ==== Level 4 Headline ==== ===== Level 5 Headline =====
{ | class="wikitable sortable" border=1 |
---|---|
Name | Address |
- | |
'''Name 2''' | '''Address 2''' |
- | |
} |
''' New Line <<-- display as bold in mediawiki
what is converted to bold?
star(*) converted to (''') , New Line example above.
here is what I do:
git clone https://github.com/tstaerk/mediasyntax.git cd mediasyntax php tools/dokuwiki2mediawiki.php test/dokusyntax-test.txt
the result's last line is
so, works as designed. What do you do to get three apostrophes?
I retest the fixed code, but seems like it still can't convert correctly for just table conversion, and will hang on normal conversion.
example 1: | Name 1 | Address 1 | | Name 2 | Address 2 |
example 2 : (will hang) ====== Title ======
| Name | Address |
output : ====== Title ======
at terminal : (stop at here) 0====== Title ====== 1 - [[DEMO Link]]