Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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][]
- 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][]
- fix(cmake) only highlight standalone numbers, not digits that begin an identifier (e.g. `3rdparty`), issue #4170 [MarkXian][]
Expand All @@ -17,6 +18,7 @@ Documentation:

CONTRIBUTORS

[alencristen]: https://github.com/alencristen
[arturict]: https://github.com/arturict
[Dhruv Maniya]: https://github.com/iamdhrv
[Elastic]: https://github.com/elastic
Expand Down
3 changes: 2 additions & 1 deletion src/languages/1c.js
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,8 @@ export default function(hljs) {
const META = {
className: 'meta',

begin: '#|&',
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 @@
&НаКлиенте
РегистрНакопления.ВыручкаИСебестоимостьПродаж.Обороты(&НачалоПериода, &КонецПериода, , ) КАК ВыручкаИСебестоимостьПродажОбороты