Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

Core Grammars:

- fix(1c) limit compiler directives to the start of a line, issue #4226 [alencristen][]
- enh(dos) add `batch` as an alias, issue #4395 [Hashim Khan][]
- fix(lisp) preserve highlighting after quoted multiplication expressions [arturict][]
- fix(rust) recognize `\\` and `\"` char-literal escapes so highlighting doesn't leak, issue #4351 [Sarath Francis][]
Expand All @@ -24,6 +25,7 @@ Documentation:

CONTRIBUTORS

[alencristen]: https://github.com/alencristen
[Hashim Khan]: https://github.com/Hashim1999164
[arturict]: https://github.com/arturict
[Dhruv Maniya]: https://github.com/iamdhrv
Expand Down
5 changes: 3 additions & 2 deletions src/languages/1c.js
Original file line number Diff line number Diff line change
Expand Up @@ -455,8 +455,9 @@ export default function(hljs) {
// meta : инструкции препроцессора, директивы компиляции
const META = {
className: 'meta',

begin: '#|&',
// convert to lookbehind in v12: begin: /(?<=^[ \t]*)[#&]/
begin: /^[ \t]*(?=[#&])/,
excludeBegin: true,
end: '$',
keywords: {
$pattern: UNDERSCORE_IDENT_RE,
Expand Down
2 changes: 2 additions & 0 deletions test/markup/1c/query-parameters.expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<span class="hljs-meta">&amp;<span class="hljs-keyword">НаКлиенте</span></span>
РегистрНакопления.ВыручкаИСебестоимостьПродаж.Обороты<span class="hljs-punctuation">(</span>&amp;НачалоПериода<span class="hljs-punctuation">,</span> &amp;КонецПериода<span class="hljs-punctuation">,</span> <span class="hljs-punctuation">,</span> <span class="hljs-punctuation">)</span> КАК ВыручкаИСебестоимостьПродажОбороты
2 changes: 2 additions & 0 deletions test/markup/1c/query-parameters.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
&НаКлиенте
РегистрНакопления.ВыручкаИСебестоимостьПродаж.Обороты(&НачалоПериода, &КонецПериода, , ) КАК ВыручкаИСебестоимостьПродажОбороты