Skip to content

Commit e84a094

Browse files
HTML: interactive build only provides warnings for current subtree
1 parent 8cd86df commit e84a094

1 file changed

Lines changed: 15 additions & 3 deletions

File tree

xsl/pretext-html.xsl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,9 +302,21 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
302302
</xsl:call-template>
303303
</xsl:if>
304304
<!-- -->
305-
<xsl:apply-templates select="$original" mode="generic-warnings"/>
306-
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
307-
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
305+
<xsl:choose>
306+
<!-- If working on a subtree, only warn on that part. -->
307+
<!-- Not much speed difference, but helpful if author is focusing -->
308+
<!-- on a part of the work. -->
309+
<xsl:when test="$b-build-incremental and $b-subsetting">
310+
<xsl:apply-templates select="$pruning-tree" mode="generic-warnings"/>
311+
<xsl:apply-templates select="$pruning-tree" mode="element-deprecation-warnings"/>
312+
<xsl:apply-templates select="$pruning-tree" mode="parameter-deprecation-warnings"/>
313+
</xsl:when>
314+
<xsl:otherwise>
315+
<xsl:apply-templates select="$original" mode="generic-warnings"/>
316+
<xsl:apply-templates select="$original" mode="element-deprecation-warnings"/>
317+
<xsl:apply-templates select="$original" mode="parameter-deprecation-warnings"/>
318+
</xsl:otherwise>
319+
</xsl:choose>
308320
<!-- Usually no manifest is created -->
309321
<xsl:call-template name="runestone-manifest"/>
310322
<!-- A structured Table of Contents for a React app approach -->

0 commit comments

Comments
 (0)