Bug with compiling tables with a ' in them

Ri
Rithe
Posts: 147
Joined: Fri Dec 10, 2010 2:32 am
Platform: Linux + Windows

Sat May 09, 2015 12:57 am Post

This could be related to the version of the Markdown compiler, I'm not sure. I'm running windows 1.8.6 and wanted to make some tables for some information in a walkthrough for a game. It seems that if there is more than one ' in a line then the table row doesn't compile correctly. For instance, the line:

Code: Select all

| None | Crow's eye | Cockatrice | Hanged man's venom | Maribor Forest | none |


compiles to:

Code: Select all

<tr>
   <td style="text-align:center;">None</td>
   <td style="text-align:center;">Crow&#8216;s eye | Cockatrice | Hanged man&#8217;s venom | Maribor Forest | none |
| | Fool&#8217;s parsley | Drowned dead <em>(may be mutually exclusive with Fleder entry)</em> | | Perfume | |
| | | Fleder <em>(may be mutually exclusive with Drowned dead entry)</em> | | White Raffard&#8217;s | |
| | | | | Wives&#8217; Tears</td>
   <td style="text-align:center;"></td>
</tr>


If there is only one ' in the line, it compiles just fine. Has anyone else run into this?

User avatar
AmberV
Posts: 24882
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat May 09, 2015 5:17 am Post

Are you sure it is the apostrophe that is making the difference? I created a test table with your row included, along with the same row and one apostrophe removed, and compiled to HTML with 1.8.6 and it came out fine. The result HTML you pasted seems considerably different than the row you pasted—as in the content is not the same—I would check for pipes, they may be miscounted, or there may not be a carriage return where you think there is (use Format/Options/Show Invisibles in the editor to check for that).

That aside, the best way to check if this a Scrivener or MMD problem is to compile to plain MMD text instead of post-processing, then examine the file in a text editor and make sure the syntax isn’t getting messed up by something in compile (like Replacements).
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Ri
Rithe
Posts: 147
Joined: Fri Dec 10, 2010 2:32 am
Platform: Linux + Windows

Sat May 09, 2015 4:23 pm Post

It is an import from a web page, and then formatted by me. I'll play around with it some more. Showing invisibles doesn't reveal anything obvious. It is strange that it seems to be formatting the ' with a specific character. HTML doesn't need that to my understanding.

I'm on Win 8.1 64 bit. Not sure if that makes a difference, either.

Ri
Rithe
Posts: 147
Joined: Fri Dec 10, 2010 2:32 am
Platform: Linux + Windows

Sat May 09, 2015 5:40 pm Post

Ah, I found it. If you use this it will happen:

Code: Select all

| Test | Another col | Yet another | and oanter| can not spell |
|:----:|:-----------:|:-----------:|:---------:|:-------------:|
| here | is a col    | with no     | quote     | Ljsdf         |
| there's | only | one | here | none|
| here's | two's | or | three's | of them |
| and one | with only | ones' more | of them | yup |


The key is that ones'. The ' at the end with everything else causes it to happen. But if you separate the lines with a return, it doesn't happen. It creates 2 tables instead. But with that ' at the end, whether it's in the middle of a table or end, doesn't matter, it generates in that goofy way that I first mentioned.

User avatar
AmberV
Posts: 24882
Joined: Sun Jun 18, 2006 4:30 am
Platform: Mac + Linux
Location: Ourense, Galiza
Contact:

Sat May 09, 2015 7:33 pm Post

Well if you don’t want typographic punctuation (which is what that special character is) there is a checkbox for that in the “Meta-Data” compile option pane. In my experiment, I was able to reproduce the result you got with your table code verbatim. When I disabled the smart typography option for MMD, then it compiled correctly.

This would indeed be something to report to MultiMarkdown support itself.
.:.
Ioa Petra'ka
“Whole sight, or all the rest is desolation.” —John Fowles

Ri
Rithe
Posts: 147
Joined: Fri Dec 10, 2010 2:32 am
Platform: Linux + Windows

Sat May 09, 2015 8:22 pm Post

Interesting. I didn't know what that checkbox did. My test showed it work correctly as well. Thanks for the help!