Skip to content

Commit

Permalink
Extract more parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
zbynek committed Sep 12, 2023
1 parent f734c65 commit 9df67b6
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public ToAsciiDoc(HyperLocalPluginManager pluginManager) {
.getByPlugin().entrySet()) {
ExtensionList<Descriptor> descriptors = ExtensionList.lookup(Descriptor.class);
for (Descriptor d: descriptors) {
if (d.getClass().getName() == entry.getKey()) {
if (entry.getKey().equals(d.getClass().getName())) {
map.put(d.clazz.getName(), entry.getValue());
}
}
Expand Down Expand Up @@ -403,7 +403,7 @@ public String generatePluginHelp(
Map<String, List<QuasiDescriptor>> byPlugin,
boolean isDeprecated,
boolean genHeader) {
Main.isUnitTest = true;
setUnitTest();

// TODO: if condition
StringBuilder whole9yards = new StringBuilder();
Expand All @@ -427,9 +427,13 @@ public String generatePluginHelp(
return whole9yards.toString();
}

private static void setUnitTest() {
Main.isUnitTest = true;
}

public String generateDirectiveHelp(
String directiveName, Map<String, List<Descriptor>> descsByPlugin, boolean genHeader) {
Main.isUnitTest = true;
setUnitTest();
StringBuilder whole9yards = new StringBuilder();
if (genHeader) {
whole9yards.append(generateHeader(directiveName));
Expand Down

0 comments on commit 9df67b6

Please sign in to comment.