Skip to content

Commit

Permalink
fix: remove undefined script-related fields from the JSON report
Browse files Browse the repository at this point in the history
This commit remove the following properties from the JSON report, as these were no longer set by EPUBCheck:
- `scriptSrc`
- `scriptTag`
- `scriptInline`

The report now on says if an item is scripted or not.

See #1515
  • Loading branch information
rdeltour committed Jul 6, 2023
1 parent 00b1d20 commit 1931d73
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 25 deletions.
24 changes: 0 additions & 24 deletions src/main/java/com/adobe/epubcheck/reporting/ItemMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,6 @@ public class ItemMetadata implements Comparable<ItemMetadata>
@JsonProperty
private boolean isScripted;
@JsonProperty
private boolean scriptSrc;
@JsonProperty
private boolean scriptTag;
@JsonProperty
private boolean scriptInline;
@JsonProperty
private String renditionLayout;
@JsonProperty
private String renditionOrientation;
Expand Down Expand Up @@ -167,24 +161,6 @@ public void handleInfo(FeatureEnum feature, String value)
case SPINE_INDEX:
this.spineIndex = Integer.parseInt(value.trim());
break;
case SCRIPT:
if (value.equals("inline"))
{
this.scriptInline = true;
}
else if (value.equals("external"))
{
this.scriptSrc = true;
}
else if (value.equals("javascript"))
{
this.scriptSrc = true;
}
else if (value.equals("tag"))
{
this.scriptTag = true;
}
break;
case RENDITION_LAYOUT:
this.renditionLayout = value;
break;
Expand Down
1 change: 0 additions & 1 deletion src/main/java/com/adobe/epubcheck/util/FeatureEnum.java
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ public enum FeatureEnum
RENDITION_ORIENTATION("rendition:orientation"),
RENDITION_SPREAD("rendition:spread"),
RESOURCE("resource"),
SCRIPT("script"),
SECTIONS("sections"),
SHA_256("SHA-256"),
SIZE("size"),
Expand Down

0 comments on commit 1931d73

Please sign in to comment.