Просмотр исходного кода

[Imported] recognize \addsec in layout, (#954) (#5428)

* recognize \addsec instead of \addsect in outline

\addsec is the correct name used by KOMA-Script,
\addsect was a typo and is removed.

COPYBARA_INTEGRATE_REVIEW=https://github.com/overleaf/overleaf/pull/954 from japm48:patch-2 11934c71f2a387f99187edff1a0ad78790ea969a

* Fix test for addsec(t)

Co-authored-by: japm48 <japm48@users.noreply.github.com>
GitOrigin-RevId: 634cef54d9d097b10700fabb05187a1af7b27375
japm48 5 лет назад
Родитель
Сommit
90befc1fdd

+ 1 - 1
services/web/frontend/js/features/outline/outline-parser.js

@@ -5,7 +5,7 @@ const COMMAND_LEVELS = {
   chapter: 30,
   addchap: 30,
   section: 40,
-  addsect: 40,
+  addsec: 40,
   subsection: 50,
   subsubsection: 60,
   paragraph: 70,

+ 1 - 1
services/web/test/frontend/features/outline/outline-parser.test.js

@@ -15,7 +15,7 @@ describe('OutlineParser', function () {
       \\chapter{Chapter}
       \\addchap{Chapter 2}
       \\section{Section 1}
-      \\addsect{Section 1b}
+      \\addsec{Section 1b}
       \\subsection{Subsection}
       \\subsubsection{Subsubsection}
       \\section{Section 2}