summaryrefslogtreecommitdiff
path: root/pygments/lexers/matlab.py
Commit message (Collapse)AuthorAgeFilesLines
* all: use yield from (#1537)Georg Brandl2020-09-061-6/+4
|
* all: fixup remaining regexlint warningsGeorg Brandl2020-09-061-4/+6
|
* Update copyright year (fixes #1514.)Matthäus G. Chajdas2020-08-221-1/+1
|
* Matlabsession line continuation (#1399)Bryan W. Weber2020-05-061-16/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | * Add explicit line continuation for Matlab session Matlab lines can be explicitly continued with the ... syntax at the end of a line. In the Session lexer, this requires continuing to the next line to add more text. Otherwise, the next line is marked as output. * The ellipses in Matlab should be a Keyword The built-in Matlab syntax highlighter highlights ... with the same formatting as a keyword. Everything after that on the line should be a comment. * Update Matlab functions and keywords from R2018a * Fix many spaces in assignment formatted as string In command mode, MATLAB allows mutiple space separated arguments to a function which are interpreted as char arrays, and are formatted as Strings. This check was also catching cases where there were multiple spaces following an assignment or comparison operation and formatting the rest of the line as a string. Now, if an = or operator is found, the commandargs state is popped and control returns to the root state. * Add tests for MATLAB formatting
* Multiline flag does not work with re.matchAlan Hamlett2020-02-081-2/+2
|
* More fixes to MATLAB lexer. (#1328)Georg Brandl2019-12-061-4/+5
|\ | | | | More fixes to MATLAB lexer.
| * More fixes to MATLAB lexer.Antony Lee2019-12-061-4/+5
| |
* | recognize escapes in Matlab double quoted stringsGeorg Brandl2019-11-271-1/+1
| |
* | Fixes #1124Jan Siqueira2019-11-271-0/+2
| |
* | MATLAB allows keywords to be used as field names.Antony Lee2019-11-271-5/+8
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | ... so don't highlight them as keywords in that position. Example MATLAB session showcasing this "feature": >> x.for = 42 x = struct with fields: for: 42 >> x x = struct with fields: for: 42 >> x.for ans = 42
* MATLAB: Recognize command form.Antony Lee2019-11-251-8/+23
| | | | | | MATLAB treats a bare word followed by arguments such as `foo bar baz` as the function call `foo('bar', 'baz')`. As such, treat everything that follows the bare word as a string.
* MATLAB: improve detection and float boundaries.Antony Lee2019-11-251-6/+14
| | | | | | | - Detect `.m` files starting with a function definition as MATLAB, not ObjC (#1149). - Require word boundaries in regexes matching numbers and floats, to avoid mishighlighting `load 123file` as starting with a number.
* Matlab/etc: add missing word boundary to recognize function kw (bitbucket PR ↵Georg Brandl2019-11-241-3/+3
| | | | #795)
* Fixup all headers and some more minor problems.2.4.2Georg Brandl2019-05-281-1/+1
|
* Fix more instances of invalid string escapesGeorg Brandl2018-11-281-2/+2
| | | | Also, raise on warnings from Pygments only.
* Copyright update.Georg Brandl2017-01-221-1/+1
|
* Add support for partials and path segments for Handlebars.Christian Hammond2016-11-041-0/+663
This introduces support for some missing features to the Handlebars lexer: Partials and path segments. Partials mostly appeared to work before, but the `>` in `{{> ... }}` would appear as a syntax error, as could other components of the partial. This change introduces support for: * Standard partials: `{{> partialName}}` * Partials with parameters: `{{> partialName varname="value"}}` * Ddynamic partials: `{{> (partialFunc)}}` * Ddynamic partials with lookups: `{{> (lookup ../path "partialName")}}` * Partial blocks: `{{> @partial-block}}` * Inline partials: `{{#*inline}}..{{/inline}}` It also introduces support for path segments, which can reference content in the current context or in a parent context. For instance, `this.name`, `this/name`, `./name`, `../name`, `this/name`, etc. These are all now tracked as variables.