Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversion from wikimedia to html failed with "source" error #1230

Closed
MSardelich opened this issue Apr 10, 2014 · 0 comments
Closed

Conversion from wikimedia to html failed with "source" error #1230

MSardelich opened this issue Apr 10, 2014 · 0 comments

Comments

@MSardelich
Copy link

I am trying to convert the official wikimedia dump of page "Academy Award", rendered to html here: http://en.wikipedia.org/wiki/Academy_Awards

It fails with error:
pandoc:
Error:
"source" (line 351, column 1):
unexpected "<"
expecting "|-" or "|}"

A closer look reveals that the error occurs when trying to convert a table with an html comment inside. The table is:

 {| class="sortable wikitable" style="text-align: center"
|-
! data-sort-type="number" style="width:180px;"|Ceremony
! style="width:150px;"|Date
! style="width:280px;"|Best Picture winner
! style="width:180px;"|Length of ceremony<!-- Should be specified as {{sort|NNN|X hours, Y minutes}}, with NNN being the length in total minutes [(X*60)+Y] zero-padded to 3 digits if necessary. X and Y should *NOT* be zero-padded. -->
! style="width:150px;"|Number of viewers
! style="width:080px;"|Rating
! style="width:200px;"|Host(s)<!-- DO NOT use "rowspan" in this column, even when the same host continues from year to year (i.e., Bob Hope, Johnny Carson, Billy Crystal); it may lead to sort and/or display issues in the venue column (i.e., venue may sort as blank instead of actual value, bar separating different venues may not appear in table). -->
! style="width:300px;"|Venue<!-- The "rowspan" parameter should be used ONLY in this column. -->
|-
| [[1st Academy Awards]] || 16 May 1929 || ''[[Wings (film)|Wings]]'' || {{sort|015|0 hours, 15 minutes}} || 270 || — || {{nowrap|[[Douglas Fairbanks]],}} {{nowrap|[[William C. deMille]]}} || [[Hollywood Roosevelt Hotel]]
|-
| [[87th Academy Awards]] || 22 February 2015 <ref name="oscars.org"/> || TBA || TBA || TBA || TBA || TBA
|-
! style="width:180px;"|Ceremony
! style="width:150px;"|Date
! style="width:280px;"|Best Picture winner
! style="width:180px;"|Length of ceremony
! style="width:150px;"|Number of viewers
! style="width:080px;"|Rating
! style="width:200px;"|Host(s)
! style="width:300px;"|Venue
|-
<!-- 84th already mentioned in second paragraph from the top, not included in this table of _past_ ceremonies until after the ceremony. -->
|}

If we omit the comment line, pandoc converts as expected : -). (btw, pandoc is the best library around!)
Unfortunately, it does not work with the html comment, even if it is placed in a new line.

I know that it is not a common practice to insert this html comments in the middle of a table, but some wikipedia authors are using it :-(

I decided to report it as an issue.

Thanks, Marcelo.

@jgm jgm closed this as completed in ca40ace Apr 10, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant