mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-06-01 05:11:34 +02:00
Merge pull request #14227 from overleaf/mj-table-gen-booktabs
[visual] Support booktabs horizontal borders GitOrigin-RevId: 9e59341b514c667fbba4154e6316274f9e42db3d
This commit is contained in:
committed by
Copybot
parent
6d8c8e678e
commit
63b09c3da3
@@ -71,7 +71,7 @@ const isRowSeparator = (node: SyntaxNode, state: EditorState) =>
|
||||
|
||||
const isHLine = (node: SyntaxNode) =>
|
||||
node.type.is('Command') &&
|
||||
Boolean(node.getChild('KnownCommand')?.getChild('HLine'))
|
||||
Boolean(node.getChild('KnownCommand')?.getChild('HorizontalLine'))
|
||||
|
||||
type Position = {
|
||||
from: number
|
||||
|
||||
@@ -90,8 +90,11 @@
|
||||
AuthorCtrlSeq,
|
||||
MaketitleCtrlSeq,
|
||||
TextColorCtrlSeq,
|
||||
ColorBoxCtrlSeq
|
||||
HLineCtrlSeq
|
||||
ColorBoxCtrlSeq,
|
||||
HLineCtrlSeq,
|
||||
TopRuleCtrlSeq,
|
||||
MidRuleCtrlSeq,
|
||||
BottomRuleCtrlSeq
|
||||
}
|
||||
|
||||
@external specialize {EnvName} specializeEnvName from "./tokens.mjs" {
|
||||
@@ -338,8 +341,8 @@ KnownCommand {
|
||||
Maketitle {
|
||||
MaketitleCtrlSeq optionalWhitespace?
|
||||
} |
|
||||
HLine {
|
||||
HLineCtrlSeq optionalWhitespace?
|
||||
HorizontalLine {
|
||||
(HLineCtrlSeq | TopRuleCtrlSeq | MidRuleCtrlSeq | BottomRuleCtrlSeq) optionalWhitespace?
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -73,6 +73,9 @@ import {
|
||||
TextColorCtrlSeq,
|
||||
ColorBoxCtrlSeq,
|
||||
HLineCtrlSeq,
|
||||
TopRuleCtrlSeq,
|
||||
MidRuleCtrlSeq,
|
||||
BottomRuleCtrlSeq,
|
||||
} from './latex.terms.mjs'
|
||||
|
||||
function nameChar(ch) {
|
||||
@@ -622,6 +625,9 @@ const otherKnowncommands = {
|
||||
'\\textcolor': TextColorCtrlSeq,
|
||||
'\\colorbox': ColorBoxCtrlSeq,
|
||||
'\\hline': HLineCtrlSeq,
|
||||
'\\toprule': TopRuleCtrlSeq,
|
||||
'\\midrule': MidRuleCtrlSeq,
|
||||
'\\bottomrule': BottomRuleCtrlSeq,
|
||||
}
|
||||
// specializer for control sequences
|
||||
// return new tokens for specific control sequences
|
||||
|
||||
Reference in New Issue
Block a user