Skip to content

Commit f2dd24b

Browse files
committed
feat: Add another way to create foldable blocs
As it's used by Work and removed from java language configuration
1 parent 5f6372c commit f2dd24b

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 = '^\\s*(?:\\/\\/|#).*\\{'
10-
const CUSTOM_BLOCK_END_REGEX = '^\\s*(?:\\/\\/|#).*\\}'
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)