You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Forgive my newishness if this is a matter which I've overlooked. This is a snippet of my rb file.
class HTML < Redcarpet::Render::HTML
include Rouge::Plugins::Redcarpet
...
def table_row(content)
"<tr>" + content + "</tr>"
end
def table_cell(content, alignment)
#This part doesn't work. Alignment remains nil for both header and body cells.
if alignment === "HEADER"
"<th>" + content + "</th>"
else
"<td>" + content + "</td>"
end
end
...
end
The flags also contain MKD_TABLE_ALIGN_CENTER, MKD_TABLE_ALIGN__L, and MKD_TABLE_ALIGN__R for cell alignment.
However, the call back function which occurs in rc_render.c in rndr_tablecell only passes CSTR2SYM("left"), CSTR2SYM("right") or CSTR2SYM("center") to BLOCK_CALLBACK("table_cell", ....)
From this, and the fact that alignment remains nil whether it's a header or not, I can only conclude that the table_cell override in the rb file doesn't get told whether or not it's a header.
Could this information be included in the callback?
I'm currently going through the C code to see if I can suggest a fix for you.
The text was updated successfully, but these errors were encountered:
Forgive my newishness if this is a matter which I've overlooked. This is a snippet of my rb file.
In html.c in rndr_tablecell there is code
The flags also contain MKD_TABLE_ALIGN_CENTER, MKD_TABLE_ALIGN__L, and MKD_TABLE_ALIGN__R for cell alignment.
However, the call back function which occurs in rc_render.c in rndr_tablecell only passes CSTR2SYM("left"), CSTR2SYM("right") or CSTR2SYM("center") to BLOCK_CALLBACK("table_cell", ....)
From this, and the fact that alignment remains nil whether it's a header or not, I can only conclude that the table_cell override in the rb file doesn't get told whether or not it's a header.
Could this information be included in the callback?
I'm currently going through the C code to see if I can suggest a fix for you.
The text was updated successfully, but these errors were encountered: