Skip to content

Commit 1bf846c

Browse files
committed
warnings for INLINE within SPLIT: fixes #568
1 parent e7d9a98 commit 1bf846c

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

javascript/parseXmlLatex.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ const ignoreTags = new Set([
5656
"SECTIONCONTENT",
5757
"span",
5858
"SPLIT",
59-
"SPLITINLINE",
6059
"PDF_ONLY"
6160
]);
6261

@@ -91,6 +90,16 @@ const processTextFunctionsDefaultLatex = {
9190
// }
9291
},
9392

93+
SPLITINLINE: (node, writeTo) => {
94+
if (getChildrenByTagName(node, "JAVASCRIPTINLINE")[0]) {
95+
console.error("remove 'INLINE' from tag JAVASCRIPTINLINE");
96+
}
97+
if (getChildrenByTagName(node, "SCHEMEINLINE")[0]) {
98+
console.error("remove 'INLINE' from tag SCHEMEINLINE");
99+
}
100+
recursiveProcessTextLatex(node.firstChild, writeTo);
101+
},
102+
94103
ABOUT: (node, writeTo) => {
95104
writeTo.push("\\chapter*{");
96105
const name = addName(node, writeTo);

xml/chapter3/section2/subsection3.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ W1(50);
154154
<SPLITINLINE><SCHEME>procedure</SCHEME>
155155
<JAVASCRIPT>function</JAVASCRIPT></SPLITINLINE>
156156
<SPLITINLINE>
157-
<SCHEME>make-withdraw</SCHEME>
158-
<JAVASCRIPTINLINE>make_withdraw</JAVASCRIPTINLINE>
157+
<SCHEME><SCHEMEINLINE>make-withdraw</SCHEMEINLINE></SCHEME>
158+
<JAVASCRIPT><JAVASCRIPTINLINE>make_withdraw</JAVASCRIPTINLINE></JAVASCRIPT>
159159
</SPLITINLINE>
160160
to an argument:
161161
<SNIPPET EVAL="no">

xml/chapter4/section3/subsection1.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,9 @@ function an_integer_starting_from(n) {
214214
<SCHEME>procedure
215215
<SCHEMEINLINE>integers-starting-from</SCHEMEINLINE>
216216
</SCHEME>
217-
<JAVASCRIPT>function</JAVASCRIPT>
217+
<JAVASCRIPT>function
218218
<JAVASCRIPTINLINE>integers_starting_from</JAVASCRIPTINLINE>
219+
</JAVASCRIPT>
219220
</SPLITINLINE>
220221
described in section <REF NAME="sec:infinite-streams"/>, but with an
221222
important difference: The stream

0 commit comments

Comments
 (0)