Skip to content

Commit

Permalink
Fix tables (#84)
Browse files Browse the repository at this point in the history
* Disable masking of table attributes

Previously table attributes like "class" were masked before processing by "pandoc" because such attributes broke whole table convertion process.
Newer "pandoc" versions handle such attributes corrently, so no need to do masking anymore.

* Remove redundant use statements

* Remove unused unit tests

* Fix readme pandoc note

* Update README.md

* Update README.md

---------

Co-authored-by: akulbii <[email protected]>
Co-authored-by: DvogelHallowelt <[email protected]>
  • Loading branch information
3 people authored Aug 31, 2023
1 parent b34104a commit 9a4b0d1
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 443 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This is a command line tool to convert the contents of a Confluence space into a

## Prerequisites
1. PHP >= 7.4 with the `xml` extension must be installed
2. The `pandoc` tool must be installed and available in the `PATH` (https://pandoc.org/installing.html)
2. `pandoc` => 3.1.6. The `pandoc` tool must be installed and available in the `PATH` (https://pandoc.org/installing.html).

## Installation
1. Download `migrate-confluence.phar` from https://github.com/hallowelt/migrate-confluence/releases/tag/latest
Expand Down Expand Up @@ -135,7 +135,7 @@ In the case that the tool can not migrate content or functionality it will creat
## Creating a build
1. Clone this repo
2. Run `composer update --no-dev`
3. Run `box build` to actually create the PHAR file in `dist/`. See also https://github.com/humbug/box
3. Run `box compile` to actually create the PHAR file in `dist/`. See also https://github.com/humbug/box

# TODO
* Reduce multiple linebreaks (`<br />`) to one
Expand Down
4 changes: 0 additions & 4 deletions src/Converter/ConfluenceConverter.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use HalloWelt\MigrateConfluence\Converter\Postprocessor\FixLineBreakInHeadings;
use HalloWelt\MigrateConfluence\Converter\Postprocessor\NestedHeadings;
use HalloWelt\MigrateConfluence\Converter\Postprocessor\RestoreCode;
use HalloWelt\MigrateConfluence\Converter\Postprocessor\RestoreTableAttributes;
use HalloWelt\MigrateConfluence\Converter\Preprocessor\CDATAClosingFixer;
use HalloWelt\MigrateConfluence\Converter\Processor\AttachmentLink;
use HalloWelt\MigrateConfluence\Converter\Processor\ConvertInfoMacro;
Expand All @@ -30,7 +29,6 @@
use HalloWelt\MigrateConfluence\Converter\Processor\Image;
use HalloWelt\MigrateConfluence\Converter\Processor\PageLink;
use HalloWelt\MigrateConfluence\Converter\Processor\PreserveCode;
use HalloWelt\MigrateConfluence\Converter\Processor\PreserveTableAttributes;
use HalloWelt\MigrateConfluence\Converter\Processor\StructuredMacroChildren;
use HalloWelt\MigrateConfluence\Converter\Processor\StructuredMacroColumn;
use HalloWelt\MigrateConfluence\Converter\Processor\StructuredMacroContenByLabel;
Expand Down Expand Up @@ -202,7 +200,6 @@ private function runProcessors( $dom ) {
$currentPageTitle = $this->getCurrentPageTitle();

$processors = [
new PreserveTableAttributes(),
new ConvertPlaceholderMacro(),
new ConvertInlineCommentMarkerMacro(),
new ConvertTipMacro(),
Expand Down Expand Up @@ -251,7 +248,6 @@ private function runProcessors( $dom ) {
*/
private function runPostProcessors() {
$postProcessors = [
new RestoreTableAttributes(),
new FixLineBreakInHeadings(),
new FixImagesWithExternalUrl(),
new RestoreCode(),
Expand Down
85 changes: 0 additions & 85 deletions src/Converter/Postprocessor/RestoreTableAttributes.php

This file was deleted.

124 changes: 0 additions & 124 deletions src/Converter/Processor/PreserveTableAttributes.php

This file was deleted.

102 changes: 0 additions & 102 deletions tests/phpunit/Converter/Postprocessor/RestoreTableAttributesTest.php

This file was deleted.

31 changes: 0 additions & 31 deletions tests/phpunit/Converter/Processor/PreserveTableAttributesTest.php

This file was deleted.

Loading

0 comments on commit 9a4b0d1

Please sign in to comment.