From 4c2c96bae5f30f7dc2f86668cc9c1994d998a14e Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 2 Jul 2022 13:00:40 +0100 Subject: [PATCH 1/3] Fix non-PR build issue --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 462d9996c..51829e719 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,7 +35,7 @@ jobs: echo "Running with system JDK" else curl -o /tmp/jdk.tar.gz $JDK - cd /tmp && tar zxf jdk-8u333-linux-x64.tar.gz + cd /tmp && tar zxf jdk.tar.gz echo "Running with JDK 8" fi From a87f8869460dbc469cd25253c1835a7e8bc21175 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 2 Jul 2022 13:01:17 +0100 Subject: [PATCH 2/3] Don't need to find jars that are in libs/lib. Close #144 --- src/bin/docbook.py | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/src/bin/docbook.py b/src/bin/docbook.py index 316a5dd1d..4af47846c 100755 --- a/src/bin/docbook.py +++ b/src/bin/docbook.py @@ -390,12 +390,22 @@ def compute_dependencies(self): or artifact not in self.depends[group] \ or version not in self.depends[group][artifact] \ or self.depends[group][artifact][version] is None: - print(f"Required package not found: {group}:{artifact}:{version}; download with Maven") - found = False + found = self._libfallback(package); if not found: sys.exit(1) + def _libfallback(self, package): + # This is pretty crude. But as issue #144 pointed out, I'm building + # a release that includes the libs. That means for jars that are + # in the release, it doesn't actually matter if we don't find them. + group, artifact, version = package.split(":") + localpath = self.root + "/libs/lib/" + artifact + "-" + version + ".jar" + if os.path.exists(localpath): + return True + print(f"Required package not found: {group}:{artifact}:{version}; download with Maven") + return False + def _higher_version(self, curver, newver): if curver == newver: return False @@ -461,6 +471,9 @@ def _add_to_classpath(self, package): curver = list(self._cp[group][artifact].keys())[0] if self._higher_version(curver, version): usever = version + # Actually remove the current version, we're replacing it. + del self._cp[group][artifact][curver]; + del self.depends[group][artifact][curver]; else: usever = curver From 8b8a2c2f9b7b5af43fea19b357b1599ff85f3834 Mon Sep 17 00:00:00 2001 From: Norman Walsh Date: Sat, 2 Jul 2022 13:54:28 +0100 Subject: [PATCH 3/3] Fix bug in list continuation. Close #145 --- src/main/xslt/modules/functions.xsl | 5 ++- .../resources/expected/orderedlist.004.html | 3 ++ src/test/resources/xml/orderedlist.004.xml | 33 +++++++++++++++++++ 3 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 src/test/resources/expected/orderedlist.004.html create mode 100644 src/test/resources/xml/orderedlist.004.xml diff --git a/src/main/xslt/modules/functions.xsl b/src/main/xslt/modules/functions.xsl index 0afa80235..a7fb6ee7c 100644 --- a/src/main/xslt/modules/functions.xsl +++ b/src/main/xslt/modules/functions.xsl @@ -125,7 +125,10 @@ - + + diff --git a/src/test/resources/expected/orderedlist.004.html b/src/test/resources/expected/orderedlist.004.html new file mode 100644 index 000000000..dba0308a9 --- /dev/null +++ b/src/test/resources/expected/orderedlist.004.html @@ -0,0 +1,3 @@ +Article wrapper

Article wrapper

An ordered list with a continuation. From +issue #145. +

  1. First Item

  2. Second Item

    1. Sub-Item a

  3. Third Item

Some text.

  1. Fourth Item

\ No newline at end of file diff --git a/src/test/resources/xml/orderedlist.004.xml b/src/test/resources/xml/orderedlist.004.xml new file mode 100644 index 000000000..aae4a3a3e --- /dev/null +++ b/src/test/resources/xml/orderedlist.004.xml @@ -0,0 +1,33 @@ + +
+Article wrapper + +An ordered list with a continuation. From +issue #145. + + + + + First Item + + + Second Item + + + Sub-Item a + + + + + Third Item + + + Some text. + + + Fourth Item + + +