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