mirror of
https://github.com/overleaf/overleaf.git
synced 2025-03-22 02:04:31 +00:00
Merge pull request #14227 from overleaf/mj-table-gen-booktabs
[visual] Support booktabs horizontal borders GitOrigin-RevId: 9e59341b514c667fbba4154e6316274f9e42db3d
This commit is contained in:
parent
6d8c8e678e
commit
63b09c3da3
3 changed files with 14 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue