Skip to content

Commit e114bba

Browse files
HTML: incremental build only provides warnings for current subtree
1 parent c78bbf8 commit e114bba

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

xsl/pretext-html.xsl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -310,9 +310,21 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
310310
</xsl:call-template>
311311
</xsl:if>
312312
<!-- -->
313-
<xsl:apply-templates select="$original" mode="generic-warnings"/>
314-
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
315-
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
313+
<xsl:choose>
314+
<!-- If working on a subtree, only warn on that part. -->
315+
<!-- Not much speed difference, but helpful if author is focusing -->
316+
<!-- on a part of the work. -->
317+
<xsl:when test="$b-build-incremental and $b-subsetting">
318+
<xsl:apply-templates select="$pruning-tree" mode="generic-warnings"/>
319+
<xsl:apply-templates select="$pruning-tree" mode="element-deprecation-warnings"/>
320+
<xsl:apply-templates select="$pruning-tree" mode="parameter-deprecation-warnings"/>
321+
</xsl:when>
322+
<xsl:otherwise>
323+
<xsl:apply-templates select="$original" mode="generic-warnings"/>
324+
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
325+
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
326+
</xsl:otherwise>
327+
</xsl:choose>
316328
<!-- Usually no manifest is created -->
317329
<xsl:call-template name="runestone-manifest"/>
318330
<!-- A structured Table of Contents for a React app approach -->

0 commit comments

Comments
 (0)