summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Roach <fisharebest@gmail.com>2017-10-17 14:23:24 +0100
committerGreg Roach <fisharebest@gmail.com>2017-10-17 14:23:24 +0100
commit0d46ec71bf038078ea02025c92b61db5141aafbe (patch)
tree9b3d4c976a7a8ce5bd8ad6fb43eeb8a9073d725c
parent34cd602e4602fd8188952ddbeaf8880c5e29355a (diff)
downloadwebtrees-0d46ec71bf038078ea02025c92b61db5141aafbe.tar.gz
webtrees-0d46ec71bf038078ea02025c92b61db5141aafbe.tar.bz2
webtrees-0d46ec71bf038078ea02025c92b61db5141aafbe.zip
Fix #855 - generate census tables using markdown
-rw-r--r--app/Module/CensusAssistantModule.php19
1 files changed, 15 insertions, 4 deletions
diff --git a/app/Module/CensusAssistantModule.php b/app/Module/CensusAssistantModule.php
index db1da1175f..d192efc5dd 100644
--- a/app/Module/CensusAssistantModule.php
+++ b/app/Module/CensusAssistantModule.php
@@ -139,20 +139,31 @@ class CensusAssistantModule extends AbstractModule {
* @return string
*/
private function createNoteText(CensusInterface $census, $ca_title, $ca_place, $ca_citation, $ca_individuals, $ca_notes) {
- $text = $ca_title . "\n" . $ca_citation . "\n" . $ca_place . "\n\n.start_formatted_area.\n\n";
+ $text = $ca_title . "\n" . $ca_citation . "\n" . $ca_place . "\n\n";
foreach ($census->columns() as $n => $column) {
- if ($n > 0) {
+ if ($n === 0) {
+ $text .= "\n";
+ } else {
$text .= '|';
}
- $text .= '.b.' . $column->abbreviation();
+ $text .= $column->abbreviation();
+ }
+
+ foreach ($census->columns() as $n => $column) {
+ if ($n === 0) {
+ $text .= "\n";
+ } else {
+ $text .= '|';
+ }
+ $text .= '-----';
}
foreach ($ca_individuals as $xref => $columns) {
$text .= "\n" . implode('|', $columns);
}
- return $text . "\n.end_formatted_area.\n\n" . $ca_notes;
+ return $text . "\n\n" . $ca_notes;
}
/**