Merge branch '#105_Subtable.Text_caption' into develop

This commit is contained in:
Kolan Sh 2016-03-20 02:32:06 +03:00
commit f7966c9d6f
2 changed files with 6 additions and 5 deletions

View File

@ -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");
}

View File

@ -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];