jlelong / vscode-latex-basics

LaTeX grammars for Visual Studio Code
MIT License
19 stars 10 forks source link

Accept usepackage or documentclass split over several lines #39

Closed jlelong closed 1 year ago

jlelong commented 1 year ago

Fix #36

With this PR, the following constructions are properly highlighted

\documentclass[
  a4paper
]{article}

\usepackage[
  atoto, %toto
  font={\small }
]{amsmath, a4apper}

\usepackage{
  aaa,
  bbb
}

Inserting a linebreak before the opening brace or bracket is not accepted.

As a by-product, the sub-scope optional.arguments is renamed to arguments.optional to honor scope precedence.