Closes #105: Subtable.caption should be of Table.Text type but not of string type.
This commit is contained in:
parent
d097078e38
commit
378010e5d8
|
@ -10,7 +10,7 @@ namespace LAview {
|
|||
/**
|
||||
* Caption of the table.
|
||||
*/
|
||||
public string caption { get; set; default = ""; }
|
||||
public Text caption { get; set; default = new Text(""); }
|
||||
|
||||
/**
|
||||
* Any text before the ``Subtable``.
|
||||
|
@ -316,8 +316,9 @@ namespace LAview {
|
|||
|
||||
s.append (before);
|
||||
|
||||
if (caption != "") {
|
||||
s.append (caption);
|
||||
var caption_text = caption.generate ();
|
||||
if (caption_text != "") {
|
||||
s.append (caption_text);
|
||||
if (size != 0)
|
||||
s.append ("\\tabularnewline");
|
||||
}
|
||||
|
|
|
@ -63,7 +63,7 @@ namespace LAview {
|
|||
uint matched_tag_abspos_right) throws ParseError {
|
||||
// TODO: Similar ro TabularParser::process_tabularnewline (), make a template method?
|
||||
if (in_caption) {
|
||||
subtable.caption = contents[row_abs_pos:tag_left_abspos].compress ();
|
||||
subtable.caption = new Text (contents[row_abs_pos:tag_left_abspos].compress ());
|
||||
in_caption = false;
|
||||
} else {
|
||||
TokenType token = add_cell (subcontents);
|
||||
|
@ -349,7 +349,7 @@ namespace LAview {
|
|||
void end_subtable (Table.ATable table,
|
||||
TableTagType subtable_type, uint tag_left_abspos) {
|
||||
if (in_caption) {
|
||||
subtable.caption = contents[row_abs_pos:tag_left_abspos].compress ();
|
||||
subtable.caption = new Text (contents[row_abs_pos:tag_left_abspos].compress ());
|
||||
in_caption = false;
|
||||
} else {
|
||||
subtable.after = contents[row_abs_pos:tag_left_abspos];
|
||||
|
|
Loading…
Reference in New Issue