Overview
The AutoClose component closes paired characters, such as brackets and quotes.
Usage
Register the AutoClose component:
import { RyuseiCode, AutoClose } from '@ryusei/code'; RyuseiCode.compose( { AutoClose } );
or import the file:
<script src="path-to-the-file/auto-close.min.js"></script>
Options
Setting false
to autoClose
disables the extension.
new RyuseiCode( { autoClose: false } );
The Language object determines what characters should be handled. By creating a custom Language, you can customize the default behaviour.