From f2aa45815fb926018ed93c8cd2aa12a2bab13686 Mon Sep 17 00:00:00 2001 From: Vladimir Schneider Date: Sun, 29 Mar 2020 20:20:01 -0400 Subject: [PATCH] add jekyll include support to docx converter --- .idea/markdown-navigator.xml | 7 + README.md | 8 +- VERSION-TODO.md | 32 +- flexmark-all/pom.xml | 2 +- flexmark-core-test/pom.xml | 2 +- .../core/test/util/html/HtmlRendererTest.java | 12 +- .../util/renderer/CoreRendererTestSuite.java | 1 + .../renderer/FullOrigSpec027CoreTest.java | 6 + .../renderer/FullOrigSpec028CoreTest.java | 6 + .../renderer/FullOrigSpec029CoreTest.java | 24 + .../util/renderer/FullOrigSpecCoreTest.java | 6 + .../flexmark-docx-converter.iml | 3 +- flexmark-docx-converter/pom.xml | 6 +- .../internal/CoreNodeDocxRenderer.java | 100 +- .../converter/internal/DocxLinkResolver.java | 14 +- .../ComboDeDocxConverterSpec2Test.java | 2 +- .../ComboDeDocxConverterSpecTest.java | 2 +- .../ComboDocxConverterAltStylesSpecTest.java | 2 +- .../ComboDocxConverterAttributeSpecTest.java | 2 +- .../ComboDocxConverterFormSpecTest.java | 2 +- .../ComboDocxConverterIssuesSpecTest.java | 2 +- .../ComboDocxConverterSpec2Test.java | 2 +- .../ComboDocxConverterSpec3Test.java | 22 + .../converter/ComboDocxConverterSpecTest.java | 2 +- .../ComboDocxConverterSpecTestBase.java | 17 + .../ComboEnDocxConverterSpec2Test.java | 2 +- .../ComboEnDocxConverterSpecTest.java | 2 +- .../resources/docx_converter_ast_spec3.md | 5075 +++++++++++++++++ .../src/test/resources/incl_enumref1.md | 3 + .../src/test/resources/incl_enumref2.md | 18 + .../src/test/resources/incl_footnote1.md | 1 + .../src/test/resources/incl_footnote2.md | 9 + .../src/test/resources/incl_footnote3.md | 2 + .../src/test/resources/incl_footnote4.md | 1 + .../src/test/resources/incl_footnote5.md | 1 + .../src/test/resources/incl_heading1.md | 1 + .../src/test/resources/incl_heading2.md | 3 + .../src/test/resources/incl_heading3.md | 3 + .../src/test/resources/incl_heading5.md | 1 + .../src/test/resources/incl_linkref1.md | 1 + .../src/test/resources/incl_linkref2.md | 1 + .../src/test/resources/incl_macros1.md | 3 + .../src/test/resources/incl_macros2.md | 4 + .../src/test/resources/incl_macros3.md | 3 + .../src/test/resources/incl_toc.md | 17 + flexmark-ext-abbreviation/pom.xml | 2 +- flexmark-ext-admonition/pom.xml | 2 +- flexmark-ext-anchorlink/pom.xml | 4 +- flexmark-ext-aside/pom.xml | 2 +- flexmark-ext-attributes/pom.xml | 2 +- flexmark-ext-autolink/pom.xml | 2 +- flexmark-ext-definition/pom.xml | 2 +- flexmark-ext-emoji/pom.xml | 2 +- flexmark-ext-enumerated-reference/pom.xml | 2 +- flexmark-ext-escaped-character/pom.xml | 2 +- flexmark-ext-footnotes/pom.xml | 2 +- .../internal/FootnoteRepository.java | 28 +- flexmark-ext-gfm-issues/pom.xml | 2 +- flexmark-ext-gfm-strikethrough/pom.xml | 2 +- flexmark-ext-gfm-tasklist/pom.xml | 2 +- flexmark-ext-gfm-users/pom.xml | 2 +- flexmark-ext-gitlab/pom.xml | 2 +- flexmark-ext-ins/pom.xml | 2 +- flexmark-ext-jekyll-front-matter/pom.xml | 2 +- .../flexmark-ext-jekyll-tag.iml | 3 +- flexmark-ext-jekyll-tag/pom.xml | 2 +- .../ext/jekyll/tag/JekyllTagExtension.java | 5 + .../internal/IncludeNodePostProcessor.java | 139 + .../src/main/javadoc/overview.html | 2 +- .../src/main/javadoc/overview.md | 2 +- flexmark-ext-macros/pom.xml | 2 +- flexmark-ext-media-tags/pom.xml | 2 +- flexmark-ext-spec-example/pom.xml | 2 +- flexmark-ext-superscript/pom.xml | 2 +- flexmark-ext-tables/pom.xml | 2 +- flexmark-ext-toc/pom.xml | 2 +- flexmark-ext-typographic/pom.xml | 2 +- flexmark-ext-wikilink/pom.xml | 2 +- .../internal/WikiLinkLinkResolver.java | 8 +- flexmark-ext-xwiki-macros/pom.xml | 2 +- flexmark-ext-yaml-front-matter/pom.xml | 2 +- flexmark-ext-youtube-embedded/pom.xml | 2 +- flexmark-ext-zzzzzz/pom.xml | 2 +- .../zzzzzz/internal/ZzzzzzLinkResolver.java | 8 +- flexmark-html2md-converter/pom.xml | 2 +- flexmark-integration-test/pom.xml | 2 +- .../java/samples/CustomContextDataSample.java | 8 +- .../samples/CustomLinkResolverSample.java | 6 +- .../PegdownCustomLinkResolverOptions.java | 6 +- flexmark-jira-converter/pom.xml | 2 +- flexmark-osgi/pom.xml | 2 +- flexmark-pdf-converter/pom.xml | 2 +- flexmark-profile-pegdown/pom.xml | 2 +- flexmark-test-specs/pom.xml | 2 +- flexmark-test-util/pom.xml | 2 +- .../flexmark/test/util/FullSpecTestCase.java | 4 +- .../test/util/spec/ResourceLocation.java | 14 +- flexmark-tree-iteration/pom.xml | 2 +- flexmark-util-ast/pom.xml | 2 +- flexmark-util-builder/pom.xml | 2 +- flexmark-util-collection/pom.xml | 2 +- flexmark-util-data/pom.xml | 2 +- flexmark-util-dependency/pom.xml | 2 +- .../util/dependency/DependencyResolver.java | 36 +- .../util/dependency/FirstDependent.java | 8 + .../util/dependency/LastDependent.java | 8 + flexmark-util-experimental/pom.xml | 2 +- flexmark-util-format/pom.xml | 2 +- flexmark-util-html/pom.xml | 2 +- flexmark-util-misc/pom.xml | 2 +- flexmark-util-options/pom.xml | 2 +- flexmark-util-sequence/pom.xml | 2 +- .../util/sequence/LineAppendableImpl.java | 10 +- flexmark-util-visitor/pom.xml | 2 +- flexmark-util/pom.xml | 2 +- flexmark-youtrack-converter/pom.xml | 2 +- flexmark/pom.xml | 2 +- .../util/AnchorRefTargetBlockPreVisitor.java | 15 + .../ast/util/AnchorRefTargetBlockVisitor.java | 9 +- .../ast/util/LinkResolverAdapter.java | 4 +- .../ast/util/LinkResolvingHandler.java | 6 +- .../formatter/internal/MergeLinkResolver.java | 9 +- .../vladsch/flexmark/html/LinkResolver.java | 6 +- .../flexmark/html/LinkResolverFactory.java | 6 +- .../html/renderer/HeaderIdGenerator.java | 13 +- .../html/renderer/HtmlIdGenerator.java | 13 +- .../renderer/LinkResolverBasicContext.java | 21 + .../html/renderer/LinkResolverContext.java | 2 +- .../parser/ParserEmulationProfile.java | 8 + pom.xml | 2 +- update-plugin.sh | 6 +- 131 files changed, 5777 insertions(+), 185 deletions(-) create mode 100644 flexmark-core-test/src/test/java/com/vladsch/flexmark/core/test/util/renderer/FullOrigSpec029CoreTest.java create mode 100644 flexmark-docx-converter/src/test/java/com/vladsch/flexmark/docx/converter/ComboDocxConverterSpec3Test.java create mode 100644 flexmark-docx-converter/src/test/resources/docx_converter_ast_spec3.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_enumref1.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_enumref2.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_footnote1.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_footnote2.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_footnote3.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_footnote4.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_footnote5.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_heading1.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_heading2.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_heading3.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_heading5.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_linkref1.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_linkref2.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_macros1.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_macros2.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_macros3.md create mode 100644 flexmark-docx-converter/src/test/resources/incl_toc.md create mode 100644 flexmark-ext-jekyll-tag/src/main/java/com/vladsch/flexmark/ext/jekyll/tag/internal/IncludeNodePostProcessor.java create mode 100644 flexmark-util-dependency/src/main/java/com/vladsch/flexmark/util/dependency/FirstDependent.java create mode 100644 flexmark-util-dependency/src/main/java/com/vladsch/flexmark/util/dependency/LastDependent.java create mode 100644 flexmark/src/main/java/com/vladsch/flexmark/ast/util/AnchorRefTargetBlockPreVisitor.java create mode 100644 flexmark/src/main/java/com/vladsch/flexmark/html/renderer/LinkResolverBasicContext.java diff --git a/.idea/markdown-navigator.xml b/.idea/markdown-navigator.xml index 337d1576d..9c271dfff 100644 --- a/.idea/markdown-navigator.xml +++ b/.idea/markdown-navigator.xml @@ -28,9 +28,12 @@