textlint-plugin-latex2e icon indicating copy to clipboard operation
textlint-plugin-latex2e copied to clipboard

Bump latex-utensils from 3.0.0 to 4.0.2

Open dependabot[bot] opened this issue 4 years ago • 2 comments

Bumps latex-utensils from 3.0.0 to 4.0.2.

Changelog

Sourced from latex-utensils's changelog.

Change Log

[4.0.0]

BREAKING CHANGES

  • Spaces parsed as Space.
  • \\ parsed as Linebreak.
  • Single \n parsed as Softbreak.
Commits

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

dependabot[bot] avatar Feb 20 '21 01:02 dependabot[bot]

ping @pddg

Thank you for nice updates, however, latex-utensils@4 conflicts the current textlint-plugin-latex2e.

tani avatar Feb 20 '21 02:02 tani

Softbrake and Space

The newly added Softbrake and Space seem to have undefined locations. The location of Node, the type that contains them, is now possibly undefined.

  • https://github.com/tamuratak/latex-utensils/blob/v4.0.2/src/latex/latex_parser_types.ts#L162-L165
  • https://github.com/tamuratak/latex-utensils/blob/v4.0.2/src/latex/latex_parser_types.ts#L153-L156

sample.tex is as follows.

\title{title}

a b c \\
def
ghi
[v3.0.0] npx luparse -l sample.tex
{
  "kind": "ast.root",
  "content": [
    {
      "kind": "command",
      "name": "title",
      "args": [
        {
          "kind": "arg.group",
          "content": [
            {
              "kind": "text.string",
              "content": "title",
              "location": {
                "start": {
                  "offset": 7,
                  "line": 1,
                  "column": 8
                },
                "end": {
                  "offset": 12,
                  "line": 1,
                  "column": 13
                }
              }
            }
          ],
          "location": {
            "start": {
              "offset": 6,
              "line": 1,
              "column": 7
            },
            "end": {
              "offset": 13,
              "line": 1,
              "column": 14
            }
          }
        }
      ],
      "location": {
        "start": {
          "offset": 0,
          "line": 1,
          "column": 1
        },
        "end": {
          "offset": 13,
          "line": 1,
          "column": 14
        }
      }
    },
    {
      "kind": "parbreak",
      "location": {
        "start": {
          "offset": 13,
          "line": 1,
          "column": 14
        },
        "end": {
          "offset": 15,
          "line": 3,
          "column": 1
        }
      }
    },
    {
      "kind": "text.string",
      "content": "a",
      "location": {
        "start": {
          "offset": 15,
          "line": 3,
          "column": 1
        },
        "end": {
          "offset": 16,
          "line": 3,
          "column": 2
        }
      }
    },
    {
      "kind": "text.string",
      "content": "b",
      "location": {
        "start": {
          "offset": 17,
          "line": 3,
          "column": 3
        },
        "end": {
          "offset": 18,
          "line": 3,
          "column": 4
        }
      }
    },
    {
      "kind": "text.string",
      "content": "c",
      "location": {
        "start": {
          "offset": 19,
          "line": 3,
          "column": 5
        },
        "end": {
          "offset": 20,
          "line": 3,
          "column": 6
        }
      }
    },
    {
      "kind": "command",
      "name": "\\",
      "args": [],
      "location": {
        "start": {
          "offset": 21,
          "line": 3,
          "column": 7
        },
        "end": {
          "offset": 23,
          "line": 3,
          "column": 9
        }
      }
    },
    {
      "kind": "text.string",
      "content": "def",
      "location": {
        "start": {
          "offset": 24,
          "line": 4,
          "column": 1
        },
        "end": {
          "offset": 27,
          "line": 4,
          "column": 4
        }
      }
    },
    {
      "kind": "text.string",
      "content": "ghi",
      "location": {
        "start": {
          "offset": 28,
          "line": 5,
          "column": 1
        },
        "end": {
          "offset": 31,
          "line": 5,
          "column": 4
        }
      }
    }
  ]
}
[v4.0.2] npx luparse -l sample.tex
{
  "kind": "ast.root",
  "content": [
    {
      "kind": "command",
      "name": "title",
      "args": [
        {
          "kind": "arg.group",
          "content": [
            {
              "kind": "text.string",
              "content": "title",
              "location": {
                "start": {
                  "offset": 7,
                  "line": 1,
                  "column": 8
                },
                "end": {
                  "offset": 12,
                  "line": 1,
                  "column": 13
                }
              }
            }
          ],
          "location": {
            "start": {
              "offset": 6,
              "line": 1,
              "column": 7
            },
            "end": {
              "offset": 13,
              "line": 1,
              "column": 14
            }
          }
        }
      ],
      "location": {
        "start": {
          "offset": 0,
          "line": 1,
          "column": 1
        },
        "end": {
          "offset": 13,
          "line": 1,
          "column": 14
        }
      }
    },
    {
      "kind": "parbreak",
      "location": {
        "start": {
          "offset": 13,
          "line": 1,
          "column": 14
        },
        "end": {
          "offset": 15,
          "line": 3,
          "column": 1
        }
      }
    },
    {
      "kind": "text.string",
      "content": "a",
      "location": {
        "start": {
          "offset": 15,
          "line": 3,
          "column": 1
        },
        "end": {
          "offset": 16,
          "line": 3,
          "column": 2
        }
      }
    },
    {
      "kind": "space"
    },
    {
      "kind": "text.string",
      "content": "b",
      "location": {
        "start": {
          "offset": 17,
          "line": 3,
          "column": 3
        },
        "end": {
          "offset": 18,
          "line": 3,
          "column": 4
        }
      }
    },
    {
      "kind": "space"
    },
    {
      "kind": "text.string",
      "content": "c",
      "location": {
        "start": {
          "offset": 19,
          "line": 3,
          "column": 5
        },
        "end": {
          "offset": 20,
          "line": 3,
          "column": 6
        }
      }
    },
    {
      "kind": "linebreak",
      "name": "\\",
      "location": {
        "start": {
          "offset": 21,
          "line": 3,
          "column": 7
        },
        "end": {
          "offset": 23,
          "line": 3,
          "column": 9
        }
      }
    },
    {
      "kind": "text.string",
      "content": "def",
      "location": {
        "start": {
          "offset": 24,
          "line": 4,
          "column": 1
        },
        "end": {
          "offset": 27,
          "line": 4,
          "column": 4
        }
      }
    },
    {
      "kind": "softbreak"
    },
    {
      "kind": "text.string",
      "content": "ghi",
      "location": {
        "start": {
          "offset": 28,
          "line": 5,
          "column": 1
        },
        "end": {
          "offset": 31,
          "line": 5,
          "column": 4
        }
      }
    },
    {
      "kind": "softbreak"
    }
  ]
}

We may need to rethink calculatePosition.ts and completeBlank.ts.

ParserOptions

tsc raises an error on the lines of the parser options. https://github.com/textlint/textlint-plugin-latex2e/pull/79/checks?check_run_id=1940718091#step:4:31

However, I don't believe it should be an error since startRule can take the value "Root". https://github.com/tamuratak/latex-utensils/blob/v4.0.2/src/latex/latex_parser.ts#L42

pddg avatar Feb 21 '21 03:02 pddg

OK, I won't notify you again about this release, but will get in touch when a new version is available. If you'd rather skip all updates until the next major or minor version, let me know by commenting @dependabot ignore this major version or @dependabot ignore this minor version.

If you change your mind, just re-open this PR and I'll resolve any conflicts on it.

dependabot[bot] avatar May 17 '23 01:05 dependabot[bot]