Skip to content

Commit 4183cd2

Browse files
committed
rake update[0.11.07]
1 parent 74f3b1f commit 4183cd2

File tree

2 files changed

+14
-89
lines changed

2 files changed

+14
-89
lines changed

lib/temml/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44

55
module Temml
66
VERSION = '0.30.0'
7-
TEMML_VERSION = '0.11.06'
7+
TEMML_VERSION = '0.11.07'
88
end

vendor/temml/javascripts/temml.js

Lines changed: 13 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -7081,88 +7081,6 @@ var temml = (function () {
70817081
mathmlBuilder: mathmlBuilder$4
70827082
});
70837083

7084-
defineFunction({
7085-
type: "href",
7086-
names: ["\\href"],
7087-
props: {
7088-
numArgs: 2,
7089-
argTypes: ["url", "original"],
7090-
allowedInText: true
7091-
},
7092-
handler: ({ parser, token }, args) => {
7093-
const body = args[1];
7094-
const href = assertNodeType(args[0], "url").url;
7095-
7096-
if (
7097-
!parser.settings.isTrusted({
7098-
command: "\\href",
7099-
url: href
7100-
})
7101-
) {
7102-
throw new ParseError(`Function "\\href" is not trusted`, token)
7103-
}
7104-
7105-
return {
7106-
type: "href",
7107-
mode: parser.mode,
7108-
href,
7109-
body: ordargument(body)
7110-
};
7111-
},
7112-
mathmlBuilder: (group, style) => {
7113-
const math = new MathNode("math", [buildExpressionRow(group.body, style)]);
7114-
const anchorNode = new AnchorNode(group.href, [], [math]);
7115-
return anchorNode
7116-
}
7117-
});
7118-
7119-
defineFunction({
7120-
type: "href",
7121-
names: ["\\url"],
7122-
props: {
7123-
numArgs: 1,
7124-
argTypes: ["url"],
7125-
allowedInText: true
7126-
},
7127-
handler: ({ parser, token }, args) => {
7128-
const href = assertNodeType(args[0], "url").url;
7129-
7130-
if (
7131-
!parser.settings.isTrusted({
7132-
command: "\\url",
7133-
url: href
7134-
})
7135-
) {
7136-
throw new ParseError(`Function "\\url" is not trusted`, token)
7137-
}
7138-
7139-
const chars = [];
7140-
for (let i = 0; i < href.length; i++) {
7141-
let c = href[i];
7142-
if (c === "~") {
7143-
c = "\\textasciitilde";
7144-
}
7145-
chars.push({
7146-
type: "textord",
7147-
mode: "text",
7148-
text: c
7149-
});
7150-
}
7151-
const body = {
7152-
type: "text",
7153-
mode: parser.mode,
7154-
font: "\\texttt",
7155-
body: chars
7156-
};
7157-
return {
7158-
type: "href",
7159-
mode: parser.mode,
7160-
href,
7161-
body: ordargument(body)
7162-
};
7163-
}
7164-
});
7165-
71667084
defineFunction({
71677085
type: "html",
71687086
names: ["\\class", "\\id", "\\style", "\\data"],
@@ -7420,17 +7338,24 @@ var temml = (function () {
74207338
},
74217339
mathmlBuilder(group, style) {
74227340
const dimension = calculateSize(group.dimension, style);
7423-
const ch = dimension.unit === "em" ? spaceCharacter(dimension.number) : "";
7341+
const ch = dimension.number > 0 && dimension.unit === "em"
7342+
? spaceCharacter(dimension.number)
7343+
: "";
74247344
if (group.mode === "text" && ch.length > 0) {
74257345
const character = new mathMLTree.TextNode(ch);
74267346
return new mathMLTree.MathNode("mtext", [character]);
74277347
} else {
7428-
const node = new mathMLTree.MathNode("mspace");
7429-
node.setAttribute("width", dimension.number + dimension.unit);
7430-
if (dimension.number < 0) {
7348+
if (dimension.number >= 0) {
7349+
const node = new mathMLTree.MathNode("mspace");
7350+
node.setAttribute("width", dimension.number + dimension.unit);
7351+
return node
7352+
} else {
7353+
// Don't use <mspace> or <mpadded> because
7354+
// WebKit recognizes negative left margin only on a <mrow> element
7355+
const node = new mathMLTree.MathNode("mrow");
74317356
node.style.marginLeft = dimension.number + dimension.unit;
7357+
return node
74327358
}
7433-
return node;
74347359
}
74357360
}
74367361
});
@@ -12061,7 +11986,7 @@ var temml = (function () {
1206111986
* https://mit-license.org/
1206211987
*/
1206311988

12064-
const version = "0.11.06";
11989+
const version = "0.11.07";
1206511990

1206611991
function postProcess(block) {
1206711992
const labelMap = {};

0 commit comments

Comments
 (0)