|
|
@@ -40,13 +40,13 @@ const Styles = {
|
|
|
|
|
|
const typeMap: Record<string, string[]> = {
|
|
|
// commands that are section headings
|
|
|
- PartCtrlSeq: ['$SectioningCommand'],
|
|
|
- ChapterCtrlSeq: ['$SectioningCommand'],
|
|
|
- SectionCtrlSeq: ['$SectioningCommand'],
|
|
|
- SubSectionCtrlSeq: ['$SectioningCommand'],
|
|
|
- SubSubSectionCtrlSeq: ['$SectioningCommand'],
|
|
|
- ParagraphCtrlSeq: ['$SectioningCommand'],
|
|
|
- SubParagraphCtrlSeq: ['$SectioningCommand'],
|
|
|
+ PartCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ ChapterCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ SectionCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ SubSectionCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ SubSubSectionCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ ParagraphCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
+ SubParagraphCtrlSeq: ['$SectioningCtrlSeq'],
|
|
|
// commands that have a "command tooltip"
|
|
|
HrefCommand: ['$CommandTooltipCommand'],
|
|
|
Include: ['$CommandTooltipCommand'],
|
|
|
@@ -90,7 +90,7 @@ export const LaTeXLanguage = LRLanguage.define({
|
|
|
// enough? For some reason it doesn't work if there's a newline after
|
|
|
// \section{a}, but works for \section{a}b
|
|
|
$Environment: node => node.getChild('Content'),
|
|
|
- $SectioningCommand: node => {
|
|
|
+ $Section: node => {
|
|
|
const BACKWARDS = -1
|
|
|
const lastChild = node.resolveInner(node.to, BACKWARDS)
|
|
|
const content = node.getChild('Content')
|