mirror of
https://github.com/Smaug123/KaTeX
synced 2025-10-08 12:38:39 +00:00
Added ability to create a dashed vertical line in arrays, using ':' (#1395)
* hacked together a dashed vertical bar * Updated tests and spec. * tidied up the screenshot template for arrays * added the vertical lines at the end back * Updated screenshots for arrays
This commit is contained in:
committed by
Kevin Barabash
parent
fcb32f058b
commit
4492eedb68
@@ -282,6 +282,15 @@ const htmlBuilder = function(group, options) {
|
||||
separator.style.verticalAlign =
|
||||
-(totalHeight - offset) + "em";
|
||||
|
||||
cols.push(separator);
|
||||
} else if (colDescr.separator === ":") {
|
||||
const separator = buildCommon.makeSpan(
|
||||
["vertical-separator", "vs-dashed"], [], options
|
||||
);
|
||||
separator.style.height = totalHeight + "em";
|
||||
separator.style.verticalAlign =
|
||||
-(totalHeight - offset) + "em";
|
||||
|
||||
cols.push(separator);
|
||||
} else {
|
||||
throw new ParseError(
|
||||
@@ -465,6 +474,11 @@ defineEnvironment({
|
||||
type: "separator",
|
||||
separator: "|",
|
||||
};
|
||||
} else if (ca === ":") {
|
||||
return {
|
||||
type: "separator",
|
||||
separator: ":",
|
||||
};
|
||||
}
|
||||
throw new ParseError(
|
||||
"Unknown column alignment: " + node.value,
|
||||
|
Reference in New Issue
Block a user