Skip to content

Commit c52fdca

Browse files
authored
Merge pull request #56 from CodinGame/fix-folding-markers
Fix folding markers
2 parents 5e2ad64 + f2dd24b commit c52fdca

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/hacks.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ import * as monaco from 'monaco-editor'
66
// custom block content
77
// }
88
*/
9-
const CUSTOM_BLOCK_BEGIN_REGEX = '^\\w*(?:\\/\\/|#).*\\{'
10-
const CUSTOM_BLOCK_END_REGEX = '^\\w*(?:\\/\\/|#).*\\}'
9+
const CUSTOM_BLOCK_BEGIN_REGEX = '^\\s*(?:\\/\\/|#).*(?:\\{|#region)'
10+
const CUSTOM_BLOCK_END_REGEX = '^\\s*(?:\\/\\/|#).*(?:\\}|#endregion)'
1111
export function addCustomFoldingMarkers (configuration: monaco.extra.ILanguageConfiguration): monaco.extra.ILanguageConfiguration {
1212
const markers = configuration.folding?.markers
1313
return {

0 commit comments

Comments
 (0)