├── .editorconfig ├── .gitignore ├── .vscodeignore ├── ChangeLog.md ├── License.md ├── README.md ├── icon.png ├── package.json ├── source ├── extension.ts ├── extension │ └── index.ts ├── index.ts ├── lib │ └── index.ts ├── lrc │ ├── index.ts │ ├── main.ts │ └── readme.md └── srt │ ├── index.ts │ ├── main.ts │ └── readme.md ├── syntax ├── all.configuration.json ├── ass.YAML-tmLanguage ├── ass.tmLanguage.json ├── extension.ts ├── lrc.tmLanguage.json ├── srt.tmLanguage.json └── subtitles.markdown.json ├── test ├── Tags+Mods.ass ├── Tags.ass ├── readme.md ├── 极乐净土.srt ├── 極樂淨土.lrc └── 琪亚娜的极乐净土.ass ├── tsconfig.json └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | [*] 2 | charset = utf-8 3 | indent_style = space 4 | indent_size = 4 5 | tab_width = 4 6 | insert_final_newline = true 7 | trim_trailing_whitespace = true 8 | 9 | [*.{arc,toml,YAML-tmLanguage}] 10 | indent_style = space 11 | indent_size = 2 12 | 13 | [*.json] 14 | indent_style = space 15 | indent_size = 4 16 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # IDEs 2 | .vscode 3 | .idea 4 | .vs 5 | 6 | # Node 7 | node_modules 8 | yarn.lock 9 | 10 | # Release 11 | *.vsix 12 | *.tgz 13 | *.nb 14 | *.ps1 15 | -------------------------------------------------------------------------------- /.vscodeignore: -------------------------------------------------------------------------------- 1 | .idea 2 | .vscode 3 | node_modules 4 | source 5 | test 6 | extension/extension.ts 7 | 8 | *.vsix 9 | *.tgz -------------------------------------------------------------------------------- /ChangeLog.md: -------------------------------------------------------------------------------- 1 | ## Version 0.3.3 2 | 3 | ### Fix 4 | 5 | - Fix `LRC` three-digit millisecond highlight problem 6 | 7 | ## Version 0.3.2 8 | 9 | ### Fix 10 | 11 | - Fix `SRT` html tag highlight 12 | 13 | 14 | ## Version 0.3.1 15 | 16 | ### Fix 17 | 18 | - Fix Time Checker 19 | - Fix ASS's color detector. 20 | 21 | 22 | ## Version 0.3.0 23 | 24 | ### New 25 | 26 | - Highlight `ASS` file. 27 | 28 | 29 | ## Version 0.2.0 30 | 31 | ### New 32 | 33 | - Highlight `SRT` file. 34 | 35 | 36 | ## Version 0.2.0 37 | 38 | ### New 39 | 40 | - Highlight `LRC` file. 41 | -------------------------------------------------------------------------------- /License.md: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | ### 1. Definitions 5 | 6 | **1.1. “Contributor”** 7 | means each individual or legal entity that creates, contributes to 8 | the creation of, or owns Covered Software. 9 | 10 | **1.2. “Contributor Version”** 11 | means the combination of the Contributions of others (if any) used 12 | by a Contributor and that particular Contributor's Contribution. 13 | 14 | **1.3. “Contribution”** 15 | means Covered Software of a particular Contributor. 16 | 17 | **1.4. “Covered Software”** 18 | means Source Code Form to which the initial Contributor has attached 19 | the notice in Exhibit A, the Executable Form of such Source Code 20 | Form, and Modifications of such Source Code Form, in each case 21 | including portions thereof. 22 | 23 | **1.5. “Incompatible With Secondary Licenses”** 24 | means 25 | 26 | * **(a)** that the initial Contributor has attached the notice described 27 | in Exhibit B to the Covered Software; or 28 | * **(b)** that the Covered Software was made available under the terms of 29 | version 1.1 or earlier of the License, but not also under the 30 | terms of a Secondary License. 31 | 32 | **1.6. “Executable Form”** 33 | means any form of the work other than Source Code Form. 34 | 35 | **1.7. “Larger Work”** 36 | means a work that combines Covered Software with other material, in 37 | a separate file or files, that is not Covered Software. 38 | 39 | **1.8. “License”** 40 | means this document. 41 | 42 | **1.9. “Licensable”** 43 | means having the right to grant, to the maximum extent possible, 44 | whether at the time of the initial grant or subsequently, any and 45 | all of the rights conveyed by this License. 46 | 47 | **1.10. “Modifications”** 48 | means any of the following: 49 | 50 | * **(a)** any file in Source Code Form that results from an addition to, 51 | deletion from, or modification of the contents of Covered 52 | Software; or 53 | * **(b)** any new file in Source Code Form that contains any Covered 54 | Software. 55 | 56 | **1.11. “Patent Claims” of a Contributor** 57 | means any patent claim(s), including without limitation, method, 58 | process, and apparatus claims, in any patent Licensable by such 59 | Contributor that would be infringed, but for the grant of the 60 | License, by the making, using, selling, offering for sale, having 61 | made, import, or transfer of either its Contributions or its 62 | Contributor Version. 63 | 64 | **1.12. “Secondary License”** 65 | means either the GNU General Public License, Version 2.0, the GNU 66 | Lesser General Public License, Version 2.1, the GNU Affero General 67 | Public License, Version 3.0, or any later versions of those 68 | licenses. 69 | 70 | **1.13. “Source Code Form”** 71 | means the form of the work preferred for making modifications. 72 | 73 | **1.14. “You” (or “Your”)** 74 | means an individual or a legal entity exercising rights under this 75 | License. For legal entities, “You” includes any entity that 76 | controls, is controlled by, or is under common control with You. For 77 | purposes of this definition, “control” means **(a)** the power, direct 78 | or indirect, to cause the direction or management of such entity, 79 | whether by contract or otherwise, or **(b)** ownership of more than 80 | fifty percent (50%) of the outstanding shares or beneficial 81 | ownership of such entity. 82 | 83 | 84 | ### 2. License Grants and Conditions 85 | 86 | #### 2.1. Grants 87 | 88 | Each Contributor hereby grants You a world-wide, royalty-free, 89 | non-exclusive license: 90 | 91 | * **(a)** under intellectual property rights (other than patent or trademark) 92 | Licensable by such Contributor to use, reproduce, make available, 93 | modify, display, perform, distribute, and otherwise exploit its 94 | Contributions, either on an unmodified basis, with Modifications, or 95 | as part of a Larger Work; and 96 | * **(b)** under Patent Claims of such Contributor to make, use, sell, offer 97 | for sale, have made, import, and otherwise transfer either its 98 | Contributions or its Contributor Version. 99 | 100 | #### 2.2. Effective Date 101 | 102 | The licenses granted in Section 2.1 with respect to any Contribution 103 | become effective for each Contribution on the date the Contributor first 104 | distributes such Contribution. 105 | 106 | #### 2.3. Limitations on Grant Scope 107 | 108 | The licenses granted in this Section 2 are the only rights granted under 109 | this License. No additional rights or licenses will be implied from the 110 | distribution or licensing of Covered Software under this License. 111 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 112 | Contributor: 113 | 114 | * **(a)** for any code that a Contributor has removed from Covered Software; 115 | or 116 | * **(b)** for infringements caused by: **(i)** Your and any other third party's 117 | modifications of Covered Software, or **(ii)** the combination of its 118 | Contributions with other software (except as part of its Contributor 119 | Version); or 120 | * **(c)** under Patent Claims infringed by Covered Software in the absence of 121 | its Contributions. 122 | 123 | This License does not grant any rights in the trademarks, service marks, 124 | or logos of any Contributor (except as may be necessary to comply with 125 | the notice requirements in Section 3.4). 126 | 127 | #### 2.4. Subsequent Licenses 128 | 129 | No Contributor makes additional grants as a result of Your choice to 130 | distribute the Covered Software under a subsequent version of this 131 | License (see Section 10.2) or under the terms of a Secondary License (if 132 | permitted under the terms of Section 3.3). 133 | 134 | #### 2.5. Representation 135 | 136 | Each Contributor represents that the Contributor believes its 137 | Contributions are its original creation(s) or it has sufficient rights 138 | to grant the rights to its Contributions conveyed by this License. 139 | 140 | #### 2.6. Fair Use 141 | 142 | This License is not intended to limit any rights You have under 143 | applicable copyright doctrines of fair use, fair dealing, or other 144 | equivalents. 145 | 146 | #### 2.7. Conditions 147 | 148 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 149 | in Section 2.1. 150 | 151 | 152 | ### 3. Responsibilities 153 | 154 | #### 3.1. Distribution of Source Form 155 | 156 | All distribution of Covered Software in Source Code Form, including any 157 | Modifications that You create or to which You contribute, must be under 158 | the terms of this License. You must inform recipients that the Source 159 | Code Form of the Covered Software is governed by the terms of this 160 | License, and how they can obtain a copy of this License. You may not 161 | attempt to alter or restrict the recipients' rights in the Source Code 162 | Form. 163 | 164 | #### 3.2. Distribution of Executable Form 165 | 166 | If You distribute Covered Software in Executable Form then: 167 | 168 | * **(a)** such Covered Software must also be made available in Source Code 169 | Form, as described in Section 3.1, and You must inform recipients of 170 | the Executable Form how they can obtain a copy of such Source Code 171 | Form by reasonable means in a timely manner, at a charge no more 172 | than the cost of distribution to the recipient; and 173 | 174 | * **(b)** You may distribute such Executable Form under the terms of this 175 | License, or sublicense it under different terms, provided that the 176 | license for the Executable Form does not attempt to limit or alter 177 | the recipients' rights in the Source Code Form under this License. 178 | 179 | #### 3.3. Distribution of a Larger Work 180 | 181 | You may create and distribute a Larger Work under terms of Your choice, 182 | provided that You also comply with the requirements of this License for 183 | the Covered Software. If the Larger Work is a combination of Covered 184 | Software with a work governed by one or more Secondary Licenses, and the 185 | Covered Software is not Incompatible With Secondary Licenses, this 186 | License permits You to additionally distribute such Covered Software 187 | under the terms of such Secondary License(s), so that the recipient of 188 | the Larger Work may, at their option, further distribute the Covered 189 | Software under the terms of either this License or such Secondary 190 | License(s). 191 | 192 | #### 3.4. Notices 193 | 194 | You may not remove or alter the substance of any license notices 195 | (including copyright notices, patent notices, disclaimers of warranty, 196 | or limitations of liability) contained within the Source Code Form of 197 | the Covered Software, except that You may alter any license notices to 198 | the extent required to remedy known factual inaccuracies. 199 | 200 | #### 3.5. Application of Additional Terms 201 | 202 | You may choose to offer, and to charge a fee for, warranty, support, 203 | indemnity or liability obligations to one or more recipients of Covered 204 | Software. However, You may do so only on Your own behalf, and not on 205 | behalf of any Contributor. You must make it absolutely clear that any 206 | such warranty, support, indemnity, or liability obligation is offered by 207 | You alone, and You hereby agree to indemnify every Contributor for any 208 | liability incurred by such Contributor as a result of warranty, support, 209 | indemnity or liability terms You offer. You may include additional 210 | disclaimers of warranty and limitations of liability specific to any 211 | jurisdiction. 212 | 213 | 214 | ### 4. Inability to Comply Due to Statute or Regulation 215 | 216 | If it is impossible for You to comply with any of the terms of this 217 | License with respect to some or all of the Covered Software due to 218 | statute, judicial order, or regulation then You must: **(a)** comply with 219 | the terms of this License to the maximum extent possible; and **(b)** 220 | describe the limitations and the code they affect. Such description must 221 | be placed in a text file included with all distributions of the Covered 222 | Software under this License. Except to the extent prohibited by statute 223 | or regulation, such description must be sufficiently detailed for a 224 | recipient of ordinary skill to be able to understand it. 225 | 226 | 227 | ### 5. Termination 228 | 229 | **5.1.** The rights granted under this License will terminate automatically 230 | if You fail to comply with any of its terms. However, if You become 231 | compliant, then the rights granted under this License from a particular 232 | Contributor are reinstated **(a)** provisionally, unless and until such 233 | Contributor explicitly and finally terminates Your grants, and **(b)** on an 234 | ongoing basis, if such Contributor fails to notify You of the 235 | non-compliance by some reasonable means prior to 60 days after You have 236 | come back into compliance. Moreover, Your grants from a particular 237 | Contributor are reinstated on an ongoing basis if such Contributor 238 | notifies You of the non-compliance by some reasonable means, this is the 239 | first time You have received notice of non-compliance with this License 240 | from such Contributor, and You become compliant prior to 30 days after 241 | Your receipt of the notice. 242 | 243 | **5.2.** If You initiate litigation against any entity by asserting a patent 244 | infringement claim (excluding declaratory judgment actions, 245 | counter-claims, and cross-claims) alleging that a Contributor Version 246 | directly or indirectly infringes any patent, then the rights granted to 247 | You by any and all Contributors for the Covered Software under Section 248 | 2.1 of this License shall terminate. 249 | 250 | **5.3.** In the event of termination under Sections 5.1 or 5.2 above, all 251 | end user license agreements (excluding distributors and resellers) which 252 | have been validly granted by You or Your distributors under this License 253 | prior to termination shall survive termination. 254 | 255 | 256 | ### 6. Disclaimer of Warranty 257 | 258 | > Covered Software is provided under this License on an “as is” 259 | > basis, without warranty of any kind, either expressed, implied, or 260 | > statutory, including, without limitation, warranties that the 261 | > Covered Software is free of defects, merchantable, fit for a 262 | > particular purpose or non-infringing. The entire risk as to the 263 | > quality and performance of the Covered Software is with You. 264 | > Should any Covered Software prove defective in any respect, You 265 | > (not any Contributor) assume the cost of any necessary servicing, 266 | > repair, or correction. This disclaimer of warranty constitutes an 267 | > essential part of this License. No use of any Covered Software is 268 | > authorized under this License except under this disclaimer. 269 | 270 | ### 7. Limitation of Liability 271 | 272 | > Under no circumstances and under no legal theory, whether tort 273 | > (including negligence), contract, or otherwise, shall any 274 | > Contributor, or anyone who distributes Covered Software as 275 | > permitted above, be liable to You for any direct, indirect, 276 | > special, incidental, or consequential damages of any character 277 | > including, without limitation, damages for lost profits, loss of 278 | > goodwill, work stoppage, computer failure or malfunction, or any 279 | > and all other commercial damages or losses, even if such party 280 | > shall have been informed of the possibility of such damages. This 281 | > limitation of liability shall not apply to liability for death or 282 | > personal injury resulting from such party's negligence to the 283 | > extent applicable law prohibits such limitation. Some 284 | > jurisdictions do not allow the exclusion or limitation of 285 | > incidental or consequential damages, so this exclusion and 286 | > limitation may not apply to You. 287 | 288 | 289 | ### 8. Litigation 290 | 291 | Any litigation relating to this License may be brought only in the 292 | courts of a jurisdiction where the defendant maintains its principal 293 | place of business and such litigation shall be governed by laws of that 294 | jurisdiction, without reference to its conflict-of-law provisions. 295 | Nothing in this Section shall prevent a party's ability to bring 296 | cross-claims or counter-claims. 297 | 298 | 299 | ### 9. Miscellaneous 300 | 301 | This License represents the complete agreement concerning the subject 302 | matter hereof. If any provision of this License is held to be 303 | unenforceable, such provision shall be reformed only to the extent 304 | necessary to make it enforceable. Any law or regulation which provides 305 | that the language of a contract shall be construed against the drafter 306 | shall not be used to construe this License against a Contributor. 307 | 308 | 309 | ### 10. Versions of the License 310 | 311 | #### 10.1. New Versions 312 | 313 | Mozilla Foundation is the license steward. Except as provided in Section 314 | 10.3, no one other than the license steward has the right to modify or 315 | publish new versions of this License. Each version will be given a 316 | distinguishing version number. 317 | 318 | #### 10.2. Effect of New Versions 319 | 320 | You may distribute the Covered Software under the terms of the version 321 | of the License under which You originally received the Covered Software, 322 | or under the terms of any subsequent version published by the license 323 | steward. 324 | 325 | #### 10.3. Modified Versions 326 | 327 | If you create software not governed by this License, and you want to 328 | create a new license for such software, you may create and use a 329 | modified version of this License if you rename the license and remove 330 | any references to the name of the license steward (except to note that 331 | such modified license differs from this License). 332 | 333 | #### 10.4. Distributing Source Code Form that is Incompatible With Secondary Licenses 334 | 335 | If You choose to distribute Source Code Form that is Incompatible With 336 | Secondary Licenses under the terms of this version of the License, the 337 | notice described in Exhibit B of this License must be attached. 338 | 339 | ## Exhibit A - Source Code Form License Notice 340 | 341 | This Source Code Form is subject to the terms of the Mozilla Public 342 | License, v. 2.0. If a copy of the MPL was not distributed with this 343 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 344 | 345 | If it is not possible or desirable to put the notice in a particular 346 | file, then You may include the notice in a location (such as a LICENSE 347 | file in a relevant directory) where a recipient would be likely to look 348 | for such a notice. 349 | 350 | You may add additional accurate notices of copyright ownership. 351 | 352 | ## Exhibit B - “Incompatible With Secondary Licenses” Notice 353 | 354 | This Source Code Form is "Incompatible With Secondary Licenses", as 355 | defined by the Mozilla Public License, v. 2.0. 356 | 357 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | VSCode Support for Subtitles 2 | ============================ 3 | [![Site](https://img.shields.io/badge/Version-v0.3.x-%23FF4D5B.svg?style=flat-square)](https://github.com/GalAster/vscode-subtitles) 4 | [![LICENSE](https://img.shields.io/badge/license-Anti%20996-blue.svg?style=flat-square)](https://github.com/996icu/996.ICU/blob/master/LICENSE) 5 | [![LICENSE](https://img.shields.io/badge/license-MPL%202.0-blue.svg?style=flat-square)](https://github.com/GalAster/vscode-subtitles/blob/master/License.md) 6 | 7 | - Github: [https://github.com/VSCode-Subtitles](https://github.com/GalAster/vscode-subtitles) 8 | - VSCode: [https://marketplace.visualstudio.com/VSCode-Subtitles](https://marketplace.visualstudio.com/items?itemName=Aster.vscode-subtitles) 9 | 10 | 11 | ASS/SSA/SRT/LRC support 12 | 13 | 14 | ## TODO 15 | - LRC Sort 16 | - SRT Re-number 17 | - ASS align 18 | 19 | ## BUGs 20 | - ASS Dialogue abnormal 21 | - ASS Script not identified 22 | 23 | ## Supports 24 | 25 | ### ASS/SSA Format 26 | ![ASS](https://user-images.githubusercontent.com/17541209/57577856-1f068600-74b3-11e9-9dec-d88acafcfe0a.png) 27 | 28 | ### LRC Format 29 | ![LRC](https://user-images.githubusercontent.com/17541209/57577857-1f9f1c80-74b3-11e9-96e1-68061f7a7420.png) 30 | 31 | ## Development 32 | 33 | - build: yarn build 34 | - pack: vsce package 35 | -------------------------------------------------------------------------------- /icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oovm/vscode-subtitles/0ac07a7ce834cd12899351828d1f2e663a6440e1/icon.png -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "vscode-subtitles", 3 | "displayName": "Lyrics/Subtitles Support", 4 | "description": "VSCode support for subtitles and lyrics", 5 | "version": "0.4.0", 6 | "icon": "icon.png", 7 | "publisher": "aster", 8 | "repository": { 9 | "type": "git", 10 | "url": "https://github.com/GalAster/vscode-subtitles.git" 11 | }, 12 | "engines": { 13 | "vscode": "^1.8.0" 14 | }, 15 | "categories": [ 16 | "Programming Languages" 17 | ], 18 | "scripts": { 19 | "build": "ts-node syntax/extension.ts", 20 | "lint": "tslint **/*.ts --fix", 21 | "pack": "vsce package" 22 | }, 23 | "contributes": { 24 | "languages": [ 25 | { 26 | "id": "lrc", 27 | "aliases": [ 28 | "Lyric" 29 | ], 30 | "extensions": [ 31 | ".lrc" 32 | ], 33 | "filenames": [], 34 | "mimetypes": [ 35 | "text/x-lrc" 36 | ], 37 | "configuration": "./syntax/all.configuration.json" 38 | }, 39 | { 40 | "id": "ass", 41 | "aliases": [ 42 | "SSA", 43 | "ASS" 44 | ], 45 | "extensions": [ 46 | ".ass", 47 | ".ssa" 48 | ], 49 | "filenames": [], 50 | "mimetypes": [], 51 | "configuration": "./syntax/all.configuration.json" 52 | }, 53 | { 54 | "id": "srt", 55 | "aliases": [ 56 | "SubRip" 57 | ], 58 | "extensions": [ 59 | ".srt" 60 | ], 61 | "filenames": [], 62 | "mimetypes": [ 63 | "text/x-srt" 64 | ], 65 | "configuration": "./syntax/all.configuration.json" 66 | } 67 | ], 68 | "grammars": [ 69 | { 70 | "language": "lrc", 71 | "scopeName": "source.lyric", 72 | "path": "./syntax/lrc.tmLanguage.json" 73 | }, 74 | { 75 | "language": "srt", 76 | "scopeName": "source.subrip", 77 | "path": "./syntax/srt.tmLanguage.json" 78 | }, 79 | { 80 | "language": "ass", 81 | "scopeName": "source.ass", 82 | "path": "./syntax/ass.tmLanguage.json" 83 | } 84 | ] 85 | }, 86 | "devDependencies": { 87 | "@types/node": "^11.13.6" 88 | }, 89 | "__metadata": { 90 | "id": "90101069-65f0-4834-a2fa-faad3b9d14d9", 91 | "publisherDisplayName": "Aster", 92 | "publisherId": "3406b78c-f287-4619-8d82-7c97998693e3" 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /source/extension.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oovm/vscode-subtitles/0ac07a7ce834cd12899351828d1f2e663a6440e1/source/extension.ts -------------------------------------------------------------------------------- /source/extension/index.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oovm/vscode-subtitles/0ac07a7ce834cd12899351828d1f2e663a6440e1/source/extension/index.ts -------------------------------------------------------------------------------- /source/index.ts: -------------------------------------------------------------------------------- 1 | export * from './lrc' 2 | export * from './srt' -------------------------------------------------------------------------------- /source/lib/index.ts: -------------------------------------------------------------------------------- 1 | import { readFileSync } from 'fs' 2 | import * as path from 'path' 3 | 4 | export function getVersion() { 5 | const json = readFileSync(path.resolve(__dirname, '..', '..', 'package.json')) 6 | return 'v' + JSON.parse(json.toString()).version 7 | } 8 | export function including(_: string) { return { include: '#' + _ } } -------------------------------------------------------------------------------- /source/lrc/index.ts: -------------------------------------------------------------------------------- 1 | import { pattern } from './main' 2 | import { getVersion } from '../lib' 3 | export const lrc = { 4 | id: 'lrc', 5 | version: getVersion(), 6 | name: 'Lyric', 7 | scopeName: 'source.lyric', 8 | fileTypes: [ 9 | 'lrc', 10 | 'lyric', 11 | ], 12 | uuid: 'ac7e1470-6d3a-457c-8b5b-bf44f6da3ed2', 13 | information_for_contributors: [ 14 | 'aster: 19260817@qq.com', 15 | ], 16 | patterns: pattern, 17 | } 18 | -------------------------------------------------------------------------------- /source/lrc/main.ts: -------------------------------------------------------------------------------- 1 | const time_line = { 2 | begin: /\[([0-5][0-9]:[0-5][0-9]\.[0-9]{1,4})\]/.source, 3 | beginCaptures: { 4 | 1: { name: 'constant.other.time.lyric' }, 5 | }, 6 | end: /(.*)[\n\r]+/.source, 7 | endCaptures: { 8 | 1: { name: 'string.literal.lyric' }, 9 | }, 10 | } 11 | 12 | const meta_info = { 13 | match: /(\[)([a-zA-Z].*)(:)(.*)(\])/.source, 14 | captures: { 15 | 1: { name: 'punctuation.definition.meta.lyric' }, 16 | 2: { name: 'entity.name.function.lyric' }, 17 | 3: { name: 'punctuation.definition.split.lyric' }, 18 | 4: { name: 'support.type.property-name' }, 19 | 5: { name: 'punctuation.definition.meta.lyric' }, 20 | }, 21 | } 22 | 23 | const illegal = { 24 | match: '(.*)', 25 | captures: { 26 | 1: { name: 'invalid.illegal.lyric' }, 27 | }, 28 | } 29 | 30 | export const pattern: any[] = [ 31 | time_line, 32 | meta_info, 33 | illegal, 34 | ] 35 | -------------------------------------------------------------------------------- /source/lrc/readme.md: -------------------------------------------------------------------------------- 1 | LRC Syntax 2 | ========== 3 | 4 | 5 | 6 | ### Meta Info 7 | 8 | ```lrc 9 | [al:本歌所在的唱片集] 10 | [ar:演出者-歌手] 11 | [au:歌詞作者-作曲家] 12 | [by:此LRC文件的创建者] 13 | [offset:+/- 以毫秒为单位加快或延後歌詞的播放] 14 | [re:创建此LRC文件的播放器或编辑器] 15 | [ti:歌词(歌曲)的标题] 16 | [ve:程序的版本] 17 | ``` 18 | 19 | ## LRC 20 | 21 | | A | B | C | Remark | 22 | | :------- | :---------------------------------- | :-------------------------------------------------- | :----- | 23 | | al | Album name | "Life" | 24 | | ar | Song artist name (performer) | "The Cardigans" | 25 | | au | Song text writer (author) | "Svennson Svenigsson" | 26 | | by | LRC file creator | "MR. THINKER!" | 27 | | Encoding | File encoding (character set) | "iso-8859-15" | 28 | | la | 3-letter language code | "eng" | 29 | | id | ?? | "vpbohasn" | 30 | | length | Music length | "2:50" Source: https://github.com/weirongxu/lrc-kit | 31 | | offset | Music-lyrics offset in milliseconds | "500" (negative values allowed) | 32 | | re | Software that created the LRC file | "Jack! The Knife" | 33 | | ti | Song title | "After All" | 34 | | ve | Software version | 15 Supreme | 35 | -------------------------------------------------------------------------------- /source/srt/index.ts: -------------------------------------------------------------------------------- 1 | import { pattern } from './main' 2 | import { getVersion } from '../lib' 3 | export const srt = { 4 | id: 'srt', 5 | version: getVersion(), 6 | name: 'Subtitle', 7 | scopeName: 'source.subrip', 8 | fileTypes: [ 9 | 'srt', 10 | 'subrip', 11 | ], 12 | uuid: '645230de-6f9d-4818-a3de-fefccaa4eaa7', 13 | information_for_contributors: [ 14 | 'aster: 19260817@qq.com', 15 | ], 16 | patterns: pattern, 17 | } 18 | -------------------------------------------------------------------------------- /source/srt/main.ts: -------------------------------------------------------------------------------- 1 | const time_line = { 2 | match: /^(\d{2}:[0-5][0-9]:[0-5][0-9],\d{3}) (-->) (\d{2}:[0-5][0-9]:[0-5][0-9],\d{3})$/.source, 3 | captures: { 4 | 1: { name: 'constant.other.time.subrip' }, 5 | 2: { name: 'keyword.operator.assignment.subrip' }, 6 | 3: { name: 'constant.other.time.subrip' }, 7 | }, 8 | } 9 | 10 | const number_line = { 11 | match: /^([1-9][0-9]*)$/.source, 12 | name: 'variable.other.readwrite.subrip', 13 | } 14 | 15 | const html_tag = { 16 | begin: '(?i)(<)(i|b|i|u|font)(?=\\s|/?>)', 17 | beginCaptures: { 18 | 1: { name: 'punctuation.definition.tag.begin.html' }, 19 | 2: { name: 'entity.name.tag.inline.any.html' }, 20 | }, 21 | end: '>', 22 | endCaptures: { 23 | 1: { name: 'punctuation.definition.tag.end.html' }, 24 | }, 25 | } 26 | 27 | 28 | const text = { 29 | begin: '.', 30 | end: '(\n\r|\n)', 31 | name: 'string.literal.subrip', 32 | patterns: [ 33 | { 34 | match: /()(.*?)(<\/b>)/.source, 35 | captures: { 36 | 1: { name: 'entity.name.tag.html' }, 37 | 2: { name: 'markup.bold.markdown' }, 38 | 3: { name: 'entity.name.tag.html' }, 39 | } 40 | }, 41 | { 42 | match: /(\{b\})(.*?)(\{\/b\})/.source, 43 | captures: { 44 | 1: { name: 'entity.name.tag.html' }, 45 | 2: { name: 'markup.bold.markdown' }, 46 | 3: { name: 'entity.name.tag.html' }, 47 | } 48 | }, 49 | { 50 | match: /()(.*?)(<\/i>)/.source, 51 | captures: { 52 | 1: { name: 'entity.name.tag.html' }, 53 | 2: { name: 'markup.italic.markdown' }, 54 | 3: { name: 'entity.name.tag.html' }, 55 | } 56 | }, 57 | { 58 | match: /(\{i\})(.*?)(\{\/i\})/.source, 59 | captures: { 60 | 1: { name: 'entity.name.tag.html' }, 61 | 2: { name: 'markup.italic.markdown' }, 62 | 3: { name: 'entity.name.tag.html' }, 63 | } 64 | }, 65 | { 66 | match: /()(.*?)(<\/u>)/.source, 67 | captures: { 68 | 1: { name: 'entity.name.tag.html' }, 69 | 2: { name: 'markup.underline.markdown' }, 70 | 3: { name: 'entity.name.tag.html' }, 71 | } 72 | }, 73 | { 74 | match: /(\{u\})(.*?)(\{\/u\})/.source, 75 | captures: { 76 | 1: { name: 'entity.name.tag.html' }, 77 | 2: { name: 'markup.underline.markdown' }, 78 | 3: { name: 'entity.name.tag.html' }, 79 | } 80 | }, 81 | { 82 | match: /()(.*?)(<\/font>)/.source, 83 | captures: { 84 | 1: { name: 'entity.name.tag.html' }, 85 | 2: { name: 'markup.font.markdown' }, 86 | 3: { name: 'entity.name.tag.html' }, 87 | } 88 | }, 89 | ] 90 | } 91 | 92 | export const pattern: any[] = [ 93 | number_line, 94 | time_line, 95 | text, 96 | ] 97 | -------------------------------------------------------------------------------- /source/srt/readme.md: -------------------------------------------------------------------------------- 1 | SRT Syntax 2 | ========== 3 | 4 | 5 | 6 | ### HTML Tag 7 | 8 | - Bold: ` ... ` or `{b} ... {/b}` 9 | - Italic: ` ... ` or `{i} ... {/i}` 10 | - Underline: ` ... ` or `{u} ... {/u}` 11 | - Font Color: ` ... ` 12 | 13 | 14 | **as** 15 | 16 | *as* 17 | 18 | _a_ 19 | 20 | ___underline___ 21 | -------------------------------------------------------------------------------- /syntax/all.configuration.json: -------------------------------------------------------------------------------- 1 | { 2 | "comments": { 3 | "lineComment": "#" 4 | }, 5 | "brackets": [ 6 | ["{", "}"], 7 | ["[", "]"], 8 | ["(", ")"] 9 | ], 10 | "autoClosingPairs": [ 11 | { "open": "{", "close": "}" }, 12 | { "open": "[", "close": "]" }, 13 | { "open": "(", "close": ")" }, 14 | { "open": "'", "close": "'", "notIn": ["string"] }, 15 | { "open": "\"", "close": "\"", "notIn": ["string"] } 16 | ], 17 | "surroundingPairs": [ 18 | ["\"", "\""], 19 | ["{", "}"], 20 | ["[", "]"], 21 | ["(", ")"], 22 | ["'", "'"], 23 | ["`", "`"], 24 | ["<", ">"] 25 | ], 26 | "autoCloseBefore": ";:.,=}])>` \n\t", 27 | "folding": { 28 | "markers": { 29 | "start": "^\\s*//\\s*#?region\\b", 30 | "end": "^\\s*//\\s*#?endregion\\b" 31 | } 32 | } 33 | } -------------------------------------------------------------------------------- /syntax/ass.YAML-tmLanguage: -------------------------------------------------------------------------------- 1 | id: ass 2 | version: v0.4.0 3 | name: Aegisub 4 | scopeName: source.ass 5 | fileTypes: 6 | - ass 7 | - ssa 8 | uuid: 90101069-65f0-4834-a2fa-faad3b9d1400 9 | information_for_contributors: 10 | - 'aster: 19260817@qq.com' 11 | patterns: 12 | - include: '#comment' 13 | - include: '#block' 14 | - include: '#tags' 15 | - include: '#invalid' 16 | repository: 17 | comment: 18 | patterns: 19 | - begin: (^[ \t]+)?(?=;) 20 | beginCaptures: 21 | '1': {name: punctuation.whitespace.comment.leading.ass} 22 | end: (?!\G) 23 | patterns: 24 | - begin: \; 25 | beginCaptures: 26 | '0': {name: punctuation.definition.comment.ass} 27 | end: "[\r\n]" 28 | name: comment.line.semicolon.ass 29 | - begin: (Comment)(:)(?:\s*) 30 | beginCaptures: 31 | '1': {name: punctuation.definition.comment.ass} 32 | '2': {name: punctuation.definition.keyValue.ass} 33 | end: "[\r\n]" 34 | name: comment.line.ass 35 | tags: 36 | patterns: 37 | - begin: (?:^[ \t]+)?(Format)(:)(?:\s*) 38 | beginCaptures: 39 | '1': {name: entity.name.tag.ass} 40 | '2': {name: punctuation.definition.keyValue.ass} 41 | end: "[\r\n]" 42 | patterns: 43 | - match: \, 44 | name: punctuation.separator.ass 45 | - match: ([a-zA-Z]) 46 | name: storage.type.ass 47 | - begin: (?:^[ \t]+)?(Style|Dialogue)(:)(?:\s*) 48 | beginCaptures: 49 | '1': {name: entity.name.tag.ass} 50 | '2': {name: punctuation.definition.keyValue.ass} 51 | end: "[\r\n]" 52 | patterns: 53 | - include: '#function' 54 | - include: '#literal' 55 | - begin: (?:^[ \t]+)?([A-Za-z\s]+)(:)(?:\s*) 56 | beginCaptures: 57 | '1': {name: entity.name.tag.ass} 58 | '2': {name: punctuation.definition.keyValue.ass} 59 | end: "[\r\n]" 60 | patterns: 61 | - include: '#literal' 62 | block: 63 | patterns: 64 | - match: (?:^[ \t]+)?(\[)(.*)(\]) 65 | name: entity.name.section.group-title.ass 66 | captures: 67 | '1': {name: punctuation.definition.entity.ass} 68 | '3': {name: punctuation.definition.entity.ass} 69 | literal: 70 | patterns: 71 | - match: \, 72 | name: punctuation.separator.ass 73 | - match: (\\)(n|N|h) 74 | name: support.type.primitive.ass 75 | - match: \d*:[0-5][0-9]:[0-5][0-9]\.\d{2} 76 | name: support.function.time.ass 77 | - match: \&H[0-9A-F]+ 78 | name: support.function.color.ass 79 | - match: ([0-9+\-.]+) 80 | name: constant.numeric.ass 81 | - match: "[^,\r\n]+" 82 | name: string.literal.ass 83 | function: 84 | patterns: 85 | - name: support.type.primitive.ass 86 | begin: "\{" 87 | end: "\}" 88 | patterns: 89 | - include: '#functions' 90 | functions: 91 | patterns: 92 | - match: (\\)(s|u|i|b|k|K|an|be|bord|blur|fa[xyz]|fs|fsc|fsp|fsv|fscx|fscy|fr[xyz]|fe|shad|ko|kf|[xy]bord|[xy]shad|rnd|rnd[xyz])([0-9+\-.]+) 93 | captures: 94 | '3': {name: constant.numeric.ass} 95 | - match: (\\)(1a|2a|3a|4a|1c|2c|3c|4c)(\&.*\&) 96 | captures: 97 | '3': {name: support.function.color.ass} 98 | - match: (\\)(fn|r)([^{}]+) 99 | captures: 100 | '3': {name: string.literal.ass} 101 | - begin: (\\)(t|clip|iclip|fad|fade|move|org|pos|distort|jitter)(\() 102 | end: (\)) 103 | patterns: 104 | - match: \, 105 | name: punctuation.separator.ass 106 | - match: ([0-9+\-.]+) 107 | name: constant.numeric.ass 108 | - match: ([a-zA-Z]+) 109 | name: support.type.primitive.ass 110 | - include: '#functions' 111 | invalid: 112 | patterns: 113 | - match: (.*) 114 | name: invalid.illegal.lyric 115 | -------------------------------------------------------------------------------- /syntax/ass.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "ass", 3 | "version": "v0.4.0", 4 | "name": "Aegisub", 5 | "scopeName": "source.ass", 6 | "fileTypes": [ 7 | "ass", 8 | "ssa" 9 | ], 10 | "uuid": "90101069-65f0-4834-a2fa-faad3b9d1400", 11 | "information_for_contributors": [ 12 | "aster: 19260817@qq.com" 13 | ], 14 | "patterns": [ 15 | { 16 | "include": "#comment" 17 | }, 18 | { 19 | "include": "#block" 20 | }, 21 | { 22 | "include": "#tags" 23 | }, 24 | { 25 | "include": "#invalid" 26 | } 27 | ], 28 | "repository": { 29 | "comment": { 30 | "patterns": [ 31 | { 32 | "begin": "(^[ \\t]+)?(?=;)", 33 | "beginCaptures": { 34 | "1": { 35 | "name": "punctuation.whitespace.comment.leading.ass" 36 | } 37 | }, 38 | "end": "(?!\\G)", 39 | "patterns": [ 40 | { 41 | "begin": "\\;", 42 | "beginCaptures": { 43 | "0": { 44 | "name": "punctuation.definition.comment.ass" 45 | } 46 | }, 47 | "end": "[\r\n]", 48 | "name": "comment.line.semicolon.ass" 49 | } 50 | ] 51 | }, 52 | { 53 | "begin": "(Comment)(:)(?:\\s*)", 54 | "beginCaptures": { 55 | "1": { 56 | "name": "punctuation.definition.comment.ass" 57 | }, 58 | "2": { 59 | "name": "punctuation.definition.keyValue.ass" 60 | } 61 | }, 62 | "end": "[\r\n]", 63 | "name": "comment.line.ass" 64 | } 65 | ] 66 | }, 67 | "tags": { 68 | "patterns": [ 69 | { 70 | "begin": "(?:^[ \\t]+)?(Format)(:)(?:\\s*)", 71 | "beginCaptures": { 72 | "1": { 73 | "name": "entity.name.tag.ass" 74 | }, 75 | "2": { 76 | "name": "punctuation.definition.keyValue.ass" 77 | } 78 | }, 79 | "end": "[\r\n]", 80 | "patterns": [ 81 | { 82 | "match": "\\,", 83 | "name": "punctuation.separator.ass" 84 | }, 85 | { 86 | "match": "([a-zA-Z])", 87 | "name": "storage.type.ass" 88 | } 89 | ] 90 | }, 91 | { 92 | "begin": "(?:^[ \\t]+)?(Style|Dialogue)(:)(?:\\s*)", 93 | "beginCaptures": { 94 | "1": { 95 | "name": "entity.name.tag.ass" 96 | }, 97 | "2": { 98 | "name": "punctuation.definition.keyValue.ass" 99 | } 100 | }, 101 | "end": "[\r\n]", 102 | "patterns": [ 103 | { 104 | "include": "#function" 105 | }, 106 | { 107 | "include": "#literal" 108 | } 109 | ] 110 | }, 111 | { 112 | "begin": "(?:^[ \\t]+)?([A-Za-z\\s]+)(:)(?:\\s*)", 113 | "beginCaptures": { 114 | "1": { 115 | "name": "entity.name.tag.ass" 116 | }, 117 | "2": { 118 | "name": "punctuation.definition.keyValue.ass" 119 | } 120 | }, 121 | "end": "[\r\n]", 122 | "patterns": [ 123 | { 124 | "include": "#literal" 125 | } 126 | ] 127 | } 128 | ] 129 | }, 130 | "block": { 131 | "patterns": [ 132 | { 133 | "match": "(?:^[ \\t]+)?(\\[)(.*)(\\])", 134 | "name": "entity.name.section.group-title.ass", 135 | "captures": { 136 | "1": { 137 | "name": "punctuation.definition.entity.ass" 138 | }, 139 | "3": { 140 | "name": "punctuation.definition.entity.ass" 141 | } 142 | } 143 | } 144 | ] 145 | }, 146 | "literal": { 147 | "patterns": [ 148 | { 149 | "match": "\\,", 150 | "name": "punctuation.separator.ass" 151 | }, 152 | { 153 | "match": "(\\\\)(n|N|h)", 154 | "name": "support.type.primitive.ass" 155 | }, 156 | { 157 | "match": "\\d*:[0-5][0-9]:[0-5][0-9]\\.\\d{2}", 158 | "name": "support.function.time.ass" 159 | }, 160 | { 161 | "match": "\\&H[0-9A-F]+", 162 | "name": "support.function.color.ass" 163 | }, 164 | { 165 | "match": "([0-9+\\-.]+)", 166 | "name": "constant.numeric.ass" 167 | }, 168 | { 169 | "match": "[^,\r\n]+", 170 | "name": "string.literal.ass" 171 | } 172 | ] 173 | }, 174 | "function": { 175 | "patterns": [ 176 | { 177 | "name": "support.type.primitive.ass", 178 | "begin": "\\{", 179 | "end": "\\}", 180 | "patterns": [ 181 | { 182 | "include": "#functions" 183 | } 184 | ] 185 | } 186 | ] 187 | }, 188 | "functions": { 189 | "patterns": [ 190 | { 191 | "match": "(\\\\)(s|u|i|b|k|K|an|be|bord|blur|fa[xyz]|fs|fsc|fsp|fsv|fscx|fscy|fr[xyz]|fe|shad|ko|kf|[xy]bord|[xy]shad|rnd|rnd[xyz])([0-9+\\-.]+)", 192 | "captures": { 193 | "3": { 194 | "name": "constant.numeric.ass" 195 | } 196 | } 197 | }, 198 | { 199 | "match": "(\\\\)(1a|2a|3a|4a|1c|2c|3c|4c)(\\&.*\\&)", 200 | "captures": { 201 | "3": { 202 | "name": "support.function.color.ass" 203 | } 204 | } 205 | }, 206 | { 207 | "match": "(\\\\)(fn|r)([^{}]+)", 208 | "captures": { 209 | "3": { 210 | "name": "string.literal.ass" 211 | } 212 | } 213 | }, 214 | { 215 | "begin": "(\\\\)(t|clip|iclip|fad|fade|move|org|pos|distort|jitter)(\\()", 216 | "end": "(\\))", 217 | "patterns": [ 218 | { 219 | "match": "\\,", 220 | "name": "punctuation.separator.ass" 221 | }, 222 | { 223 | "match": "([0-9+\\-.]+)", 224 | "name": "constant.numeric.ass" 225 | }, 226 | { 227 | "match": "([a-zA-Z]+)", 228 | "name": "support.type.primitive.ass" 229 | }, 230 | { 231 | "include": "#functions" 232 | } 233 | ] 234 | } 235 | ] 236 | }, 237 | "invalid": { 238 | "patterns": [ 239 | { 240 | "match": "(.*)", 241 | "name": "invalid.illegal.lyric" 242 | } 243 | ] 244 | } 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /syntax/extension.ts: -------------------------------------------------------------------------------- 1 | import { writeFileSync } from 'fs' 2 | import { srt, lrc } from '../source' 3 | 4 | interface tmLang { 5 | id: string 6 | scopeName: string 7 | uuid: string 8 | } 9 | 10 | function saveSyntax(name: tmLang) { 11 | writeFileSync( 12 | `${__dirname}/${name.id}.tmLanguage.json`, 13 | JSON.stringify(name, null, 4), 14 | ) 15 | } 16 | 17 | [lrc, srt].map(saveSyntax) 18 | -------------------------------------------------------------------------------- /syntax/lrc.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "lrc", 3 | "version": "v0.4.0", 4 | "name": "Lyric", 5 | "scopeName": "source.lyric", 6 | "fileTypes": [ 7 | "lrc", 8 | "lyric" 9 | ], 10 | "uuid": "ac7e1470-6d3a-457c-8b5b-bf44f6da3ed2", 11 | "information_for_contributors": [ 12 | "aster: 19260817@qq.com" 13 | ], 14 | "patterns": [ 15 | { 16 | "begin": "\\[([0-5][0-9]:[0-5][0-9]\\.[0-9]{1,4})\\]", 17 | "beginCaptures": { 18 | "1": { 19 | "name": "constant.other.time.lyric" 20 | } 21 | }, 22 | "end": "(.*)[\\n\\r]+", 23 | "endCaptures": { 24 | "1": { 25 | "name": "string.literal.lyric" 26 | } 27 | } 28 | }, 29 | { 30 | "match": "(\\[)([a-zA-Z].*)(:)(.*)(\\])", 31 | "captures": { 32 | "1": { 33 | "name": "punctuation.definition.meta.lyric" 34 | }, 35 | "2": { 36 | "name": "entity.name.function.lyric" 37 | }, 38 | "3": { 39 | "name": "punctuation.definition.split.lyric" 40 | }, 41 | "4": { 42 | "name": "support.type.property-name" 43 | }, 44 | "5": { 45 | "name": "punctuation.definition.meta.lyric" 46 | } 47 | } 48 | }, 49 | { 50 | "match": "(.*)", 51 | "captures": { 52 | "1": { 53 | "name": "invalid.illegal.lyric" 54 | } 55 | } 56 | } 57 | ] 58 | } -------------------------------------------------------------------------------- /syntax/srt.tmLanguage.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "srt", 3 | "version": "v0.4.0", 4 | "name": "Subtitle", 5 | "scopeName": "source.subrip", 6 | "fileTypes": [ 7 | "srt", 8 | "subrip" 9 | ], 10 | "uuid": "645230de-6f9d-4818-a3de-fefccaa4eaa7", 11 | "information_for_contributors": [ 12 | "aster: 19260817@qq.com" 13 | ], 14 | "patterns": [ 15 | { 16 | "match": "^([1-9][0-9]*)$", 17 | "name": "variable.other.readwrite.subrip" 18 | }, 19 | { 20 | "match": "^(\\d{2}:[0-5][0-9]:[0-5][0-9],\\d{3}) (-->) (\\d{2}:[0-5][0-9]:[0-5][0-9],\\d{3})$", 21 | "captures": { 22 | "1": { 23 | "name": "constant.other.time.subrip" 24 | }, 25 | "2": { 26 | "name": "keyword.operator.assignment.subrip" 27 | }, 28 | "3": { 29 | "name": "constant.other.time.subrip" 30 | } 31 | } 32 | }, 33 | { 34 | "begin": ".", 35 | "end": "(\n\r|\n)", 36 | "name": "string.literal.subrip", 37 | "patterns": [ 38 | { 39 | "match": "()(.*?)(<\\/b>)", 40 | "captures": { 41 | "1": { 42 | "name": "entity.name.tag.html" 43 | }, 44 | "2": { 45 | "name": "markup.bold.markdown" 46 | }, 47 | "3": { 48 | "name": "entity.name.tag.html" 49 | } 50 | } 51 | }, 52 | { 53 | "match": "(\\{b\\})(.*?)(\\{\\/b\\})", 54 | "captures": { 55 | "1": { 56 | "name": "entity.name.tag.html" 57 | }, 58 | "2": { 59 | "name": "markup.bold.markdown" 60 | }, 61 | "3": { 62 | "name": "entity.name.tag.html" 63 | } 64 | } 65 | }, 66 | { 67 | "match": "()(.*?)(<\\/i>)", 68 | "captures": { 69 | "1": { 70 | "name": "entity.name.tag.html" 71 | }, 72 | "2": { 73 | "name": "markup.italic.markdown" 74 | }, 75 | "3": { 76 | "name": "entity.name.tag.html" 77 | } 78 | } 79 | }, 80 | { 81 | "match": "(\\{i\\})(.*?)(\\{\\/i\\})", 82 | "captures": { 83 | "1": { 84 | "name": "entity.name.tag.html" 85 | }, 86 | "2": { 87 | "name": "markup.italic.markdown" 88 | }, 89 | "3": { 90 | "name": "entity.name.tag.html" 91 | } 92 | } 93 | }, 94 | { 95 | "match": "()(.*?)(<\\/u>)", 96 | "captures": { 97 | "1": { 98 | "name": "entity.name.tag.html" 99 | }, 100 | "2": { 101 | "name": "markup.underline.markdown" 102 | }, 103 | "3": { 104 | "name": "entity.name.tag.html" 105 | } 106 | } 107 | }, 108 | { 109 | "match": "(\\{u\\})(.*?)(\\{\\/u\\})", 110 | "captures": { 111 | "1": { 112 | "name": "entity.name.tag.html" 113 | }, 114 | "2": { 115 | "name": "markup.underline.markdown" 116 | }, 117 | "3": { 118 | "name": "entity.name.tag.html" 119 | } 120 | } 121 | }, 122 | { 123 | "match": "()(.*?)(<\\/font>)", 124 | "captures": { 125 | "1": { 126 | "name": "entity.name.tag.html" 127 | }, 128 | "2": { 129 | "name": "markup.font.markdown" 130 | }, 131 | "3": { 132 | "name": "entity.name.tag.html" 133 | } 134 | } 135 | } 136 | ] 137 | } 138 | ] 139 | } -------------------------------------------------------------------------------- /syntax/subtitles.markdown.json: -------------------------------------------------------------------------------- 1 | { 2 | "fileTypes": [], 3 | "scopeName": "markdown.subtitles.codeblock", 4 | "injectionSelector": "L:markup.fenced_code.block.markdown", 5 | "patterns": [ 6 | { 7 | "begin": "(?<=[`~])ass(\\s+[^`~]*)?$", 8 | "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)", 9 | "patterns": [ 10 | { 11 | "begin": "(^|\\G)(\\s*)(.*)", 12 | "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", 13 | "contentName": "meta.embedded.block.ass", 14 | "patterns": [ 15 | { 16 | "include": "source.ass" 17 | } 18 | ] 19 | } 20 | ] 21 | }, 22 | { 23 | "begin": "(?<=[`~])lrc(\\s+[^`~]*)?$", 24 | "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)", 25 | "patterns": [ 26 | { 27 | "begin": "(^|\\G)(\\s*)(.*)", 28 | "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", 29 | "contentName": "meta.embedded.block.lrc", 30 | "patterns": [ 31 | { 32 | "include": "source.lrc" 33 | } 34 | ] 35 | } 36 | ] 37 | }, 38 | { 39 | "begin": "(?<=[`~])srt(\\s+[^`~]*)?$", 40 | "end": "(^|\\G)(?=\\s*[`~]{3,}\\s*$)", 41 | "patterns": [ 42 | { 43 | "begin": "(^|\\G)(\\s*)(.*)", 44 | "while": "(^|\\G)(?!\\s*([`~]{3,})\\s*$)", 45 | "contentName": "meta.embedded.block.srt", 46 | "patterns": [ 47 | { 48 | "include": "source.srt" 49 | } 50 | ] 51 | } 52 | ] 53 | } 54 | ] 55 | } -------------------------------------------------------------------------------- /test/Tags+Mods.ass: -------------------------------------------------------------------------------- 1 | [Script Info] 2 | ; Script generated by Aegisub 3.2.2 3 | ; http://www.aegisub.org/ 4 | ScriptType: v4.00+ 5 | PlayResX: 1920 6 | PlayResY: 1080 7 | Timer: 100.0000 8 | YCbCr Matrix: TV.709 9 | 10 | [Aegisub Project Garbage] 11 | Video File: ?dummy:23.976000:40000:1920:1080:17:188:255: 12 | Video AR Value: 1.777778 13 | Video Zoom Percent: 0.250000 14 | Scroll Position: 24 15 | Active Line: 45 16 | Video Position: 1055 17 | 18 | [V4+ Styles] 19 | Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding 20 | Style: OPCN-furigana,思源黑体,150,&H00FFFFFF,&H00000000,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,1,0,5,0,0,13,1 21 | Style: OPCN,思源黑体,150,&H00FFFFFF,&H00000000,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,3,0,5,0,0,13,1 22 | 23 | [Events] 24 | Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 25 | Comment: 0,0:00:00.00,0:00:00.00,OPCN,,0,0,0,,说明:本外挂字幕中的ASS特效标签尽可能按26个大小写字母排序,部分ASS特效标签需要配合其他ASS特效标签使用,如有不当之处还请多多包涵。 26 | Dialogue: 0,0:00:00.00,0:00:01.00,OPCN,主要颜色透明度,0,0,0,,{\1va(&HFF&,&HFF&,&H00&,&H00&)}字幕测试 27 | Dialogue: 0,0:00:01.00,0:00:02.00,OPCN,次要颜色透明度,0,0,0,似乎无效,{\2va(&HFF&,&HFF&,&H00&,&H00&)\K100}字幕测试 28 | Dialogue: 0,0:00:02.00,0:00:03.00,OPCN,边框颜色透明度,0,0,0,,{\3va(&HFF&,&HFF&,&H00&,&H00&)}字幕测试 29 | Dialogue: 0,0:00:03.00,0:00:04.00,OPCN,阴影颜色透明度,0,0,0,,{\4va(&HFF&,&HFF&,&H00&,&H00&)\shad6}字幕测试 30 | Dialogue: 0,0:00:04.00,0:00:05.00,OPCN,主要颜色渐变,0,0,0,,{\1vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)}字幕测试 31 | Dialogue: 0,0:00:05.00,0:00:06.00,OPCN,次要颜色渐变,0,0,0,,{\2vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\K100}字幕测试 32 | Dialogue: 0,0:00:06.00,0:00:07.00,OPCN,边框颜色渐变,0,0,0,,{\3vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)}字幕测试 33 | Dialogue: 0,0:00:07.00,0:00:08.00,OPCN,阴影颜色渐变,0,0,0,,{\4vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\shad6}字幕测试 34 | Dialogue: 0,0:00:08.00,0:00:09.00,OPCN,扭曲,0,0,0,,{\distort(1,0,1.2,1,-0.2,1)}字幕测试 35 | Dialogue: 0,0:00:09.00,0:00:10.00,OPCN,字体缩放,0,0,0,,{\fsc200}字幕测试 36 | Dialogue: 0,0:00:10.00,0:00:11.00,OPCN,纵向偏移,0,0,0,,{\fsvp0}字{\fsvp10}幕{\fsvp-10}测{\fsvp10}试 37 | Dialogue: 0,0:00:11.00,0:00:12.00,OPCN,基线倾斜,0,0,0,,{\frs45\frz-45\fsp25}字幕测试 38 | Dialogue: 0,0:00:12.00,0:00:13.00,OPCN,字幕蒙版(挂图),0,0,0,,{\1img(Aegisub LOGO 380×380.png)}字幕测试 39 | Dialogue: 0,0:00:12.00,0:00:13.00,OPCN,纯挂图,0,0,0,,{\1img(Aegisub LOGO 380×380.png)\bord0\p1\pos(320,540)}m 0 0 l 380 0 l 380 380 l 0 380 l 0 0 40 | Dialogue: 0,0:00:13.00,0:00:14.00,OPCN,抖动,0,0,0,,{\jitter(100,100,100,100,10,1)}字幕测试 41 | Dialogue: 0,0:00:14.00,0:00:15.00,OPCN,极性移动,0,0,0,,{\mover(960,540,960,540,0,360,200,200,0,1000)}字幕测试 42 | Dialogue: 0,0:00:15.00,0:00:16.00,OPCN,曲线移动-三段,0,0,0,,{\moves3(800,100,1200,100,1200,400,0,500)}字幕测试 43 | Dialogue: 0,0:00:16.00,0:00:17.00,OPCN,曲线移动-四段,0,0,0,,{\moves4(800,100,1200,100,1200,400,1600,400,0,500)}字幕测试 44 | Dialogue: 0,0:00:17.00,0:00:18.00,OPCN,可移动矢量clip,0,0,0,,{\movevc(0,400,0,600,0,1000)\clip(m 960 50 l 860 100 l 760 50 l 860 0)\pos(960,540)}字幕测试 45 | Dialogue: 0,0:00:18.00,0:00:19.00,OPCN,边界变形,0,0,0,,{\rnd30}字幕测试 46 | Dialogue: 0,0:00:19.00,0:00:20.00,OPCN,边界变形-X轴,0,0,0,,{\rndx30}字幕测试 47 | Dialogue: 0,0:00:20.00,0:00:21.00,OPCN,边界变形-Y轴,0,0,0,,{\rndy30}字幕测试 48 | Dialogue: 0,0:00:21.00,0:00:22.00,OPCN,边界变形-Z轴,0,0,0,,{\rndz30}字幕测试 49 | Dialogue: 0,0:00:22.00,0:00:23.00,OPCN,Z坐标+X轴旋转,0,0,0,,{\z100\frx30)}字幕测试 50 | Dialogue: 0,0:00:23.00,0:00:24.00,OPCN,Z坐标+Y轴旋转,0,0,0,,{\z100\fry30}字幕测试 51 | Comment: 0,0:00:00.00,0:00:00.00,OPCN,,0,0,0,,--------------------以下为t标签的动画效果-------------------- 52 | Dialogue: 0,0:00:24.00,0:00:25.00,OPCN,主要颜色透明度,0,0,0,,{\1va(&HFF&,&HFF&,&H00&,&H00&)\t(0,1000,\1va(&H00&,&H00&,&H00&,&H00&))}字幕测试 53 | Dialogue: 0,0:00:25.00,0:00:26.00,OPCN,次要颜色透明度,0,0,0,似乎无效,{\2va(&HFF&,&HFF&,&H00&,&H00&)\t(0,1000,\2va(&H00&,&H00&,&H00&,&H00&))\K100}字幕测试 54 | Dialogue: 0,0:00:26.00,0:00:27.00,OPCN,边框颜色透明度,0,0,0,,{\3va(&HFF&,&HFF&,&H00&,&H00&)\t(0,1000,\3va(&H00&,&H00&,&H00&,&H00&))}字幕测试 55 | Dialogue: 0,0:00:27.00,0:00:28.00,OPCN,阴影颜色透明度,0,0,0,,{\4va(&HFF&,&HFF&,&H00&,&H00&)\t(0,1000,\4va(&H00&,&H00&,&H00&,&H00&))\shad120}字幕测试 56 | Dialogue: 0,0:00:28.00,0:00:29.00,OPCN,主要颜色渐变,0,0,0,,{\1vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\t(0,1000,\1vc(&HFF00FF&,&H000000&,&H00FFFF&,&HFFFF00&))}字幕测试 57 | Dialogue: 0,0:00:29.00,0:00:30.00,OPCN,次要颜色渐变,0,0,0,,{\2vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\t(0,1000,\2vc(&HFF00FF&,&H000000&,&H00FFFF&,&HFFFF00&))\K100}字幕测试 58 | Dialogue: 0,0:00:30.00,0:00:31.00,OPCN,边框颜色渐变,0,0,0,,{\3vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\t(0,1000,\3vc(&HFF00FF&,&H000000&,&H00FFFF&,&HFFFF00&))}字幕测试 59 | Dialogue: 0,0:00:31.00,0:00:32.00,OPCN,阴影颜色渐变,0,0,0,,{\4vc(&H00FFFF&,&HFFFF00&,&HFF00FF&,&H000000&)\t(0,1000,\4vc(&HFF00FF&,&H000000&,&H00FFFF&,&HFFFF00&))\shad120}字幕测试 60 | Dialogue: 0,0:00:32.00,0:00:33.00,OPCN,扭曲,0,0,0,,{\distort(1,0,1.2,1,-0.2,1)\t(0,1000,\distort(1,0,1,1,0,1))}字幕测试 61 | Dialogue: 0,0:00:33.00,0:00:34.00,OPCN,字体缩放,0,0,0,,{\fsc200\t(0,1000,\fsc100)}字幕测试 62 | Dialogue: 0,0:00:34.00,0:00:35.00,OPCN,纵向偏移,0,0,0,,{\fsvp0\t(0,1000,\fsvp10)}字{\fsvp10\t(0,1000,\fsvp-10)}幕{\fsvp-10\t(0,1000,\fsvp10)}测{\fsvp10\t(0,1000,\fsvp-10)}试 63 | Dialogue: 0,0:00:35.00,0:00:36.00,OPCN,基线倾斜,0,0,0,,{\frs0\t(0,1000,\frs90)}字幕测试 64 | Dialogue: 0,0:00:36.00,0:00:37.00,OPCN,抖动,0,0,0,,{\jitter(100,100,100,100)\t(0,1000,\jitter(500,500,500,500))}字幕测试 65 | Dialogue: 0,0:00:37.00,0:00:38.00,OPCN,边界变形,0,0,0,,{\rnd30\t(0,1000,\rnd60)}字幕测试 66 | Dialogue: 0,0:00:38.00,0:00:39.00,OPCN,边界变形-X轴,0,0,0,,{\rndx30\t(0,1000,\rndx60)}字幕测试 67 | Dialogue: 0,0:00:39.00,0:00:40.00,OPCN,边界变形-Y轴,0,0,0,,{\rndy30\t(0,1000,\rndy60)}字幕测试 68 | Dialogue: 0,0:00:40.00,0:00:41.00,OPCN,边界变形-Z轴,0,0,0,,{\rndz30\t(0,1000,\rndz60)}字幕测试 69 | Dialogue: 0,0:00:41.00,0:00:42.00,OPCN,Z坐标+X轴旋转,0,0,0,,{\z100\t(0,1000,\z0\frx30)}字幕测试 70 | Dialogue: 0,0:00:42.00,0:00:43.00,OPCN,Z坐标+Y轴旋转,0,0,0,,{\z100\t(0,1000,\z0\fry30)}字幕测试 71 | -------------------------------------------------------------------------------- /test/Tags.ass: -------------------------------------------------------------------------------- 1 | [Script Info] 2 | ; Script generated by Aegisub 3.2.2 3 | ; http://www.aegisub.org/ 4 | ScriptType: v4.00+ 5 | PlayResX: 1920 6 | PlayResY: 1080 7 | Timer: 100.0000 8 | YCbCr Matrix: TV.709 9 | 10 | [Aegisub Project Garbage] 11 | Video File: ?dummy:23.976000:40000:1280:720:17:188:255: 12 | Video AR Value: 1.777778 13 | Video Zoom Percent: 0.375000 14 | Scroll Position: 69 15 | Active Line: 91 16 | Video Position: 2230 17 | 18 | [V4+ Styles] 19 | Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding 20 | Style: OPCN-furigana,思源黑体,150,&H00FFFFFF,&H00000000,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,1,0,5,0,0,13,1 21 | Style: OPCN,思源黑体,150,&H00FFFFFF,&H00000000,&H00000000,&H00000000,-1,0,0,0,100,100,0,0,1,3,0,5,20,20,10,1 22 | 23 | [Events] 24 | Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 25 | Comment: 0,0:00:00.00,0:00:00.00,OPCN,,0,0,0,,说明:本外挂字幕中的ASS特效标签尽可能按26个大小写字母排序(功能互补的标签例外),部分ASS特效标签需要配合其他ASS特效标签使用,比如第21行。如有不当之处还请多多包涵。 26 | Dialogue: 0,0:00:00.00,0:00:01.00,OPCN,主要颜色透明度,0,0,0,,{\1a&H64&}字幕测试 27 | Dialogue: 0,0:00:01.00,0:00:02.00,OPCN,次要颜色透明度,0,0,0,,{\2a&H64&\K100}字幕测试 28 | Dialogue: 0,0:00:02.00,0:00:03.00,OPCN,边框颜色透明度,0,0,0,,{\3a&H64&}字幕测试 29 | Dialogue: 0,0:00:03.00,0:00:04.00,OPCN,阴影颜色透明度,0,0,0,,{\4a&H64&\shad120}字幕测试 30 | Dialogue: 0,0:00:04.00,0:00:05.00,OPCN,主要颜色,0,0,0,,{\1c&H0096FF&}字幕测试 31 | Dialogue: 0,0:00:05.00,0:00:06.00,OPCN,次要颜色,0,0,0,,{\2c&H0096FF&\K100}字幕测试 32 | Dialogue: 0,0:00:06.00,0:00:07.00,OPCN,边框颜色,0,0,0,,{\3c&H0096FF&}字幕测试 33 | Dialogue: 0,0:00:07.00,0:00:08.00,OPCN,阴影颜色,0,0,0,,{\4c&H0096FF&\shad120}字幕测试 34 | Dialogue: 0,0:00:08.00,0:00:09.00,OPCN,行对齐方式(左下角),0,0,0,,{\an1}字幕测试 35 | Dialogue: 0,0:00:09.00,0:00:10.00,OPCN,行对齐方式(正下方),0,0,0,,{\an2}字幕测试 36 | Dialogue: 0,0:00:10.00,0:00:11.00,OPCN,行对齐方式(右下角),0,0,0,,{\an3}字幕测试 37 | Dialogue: 0,0:00:11.00,0:00:12.00,OPCN,行对齐方式(左中部),0,0,0,,{\an4}字幕测试 38 | Dialogue: 0,0:00:12.00,0:00:13.00,OPCN,行对齐方式(正中间),0,0,0,,{\an5}字幕测试 39 | Dialogue: 0,0:00:13.00,0:00:14.00,OPCN,行对齐方式(右中部),0,0,0,,{\an6}字幕测试 40 | Dialogue: 0,0:00:14.00,0:00:15.00,OPCN,行对齐方式(左上角),0,0,0,,{\an7}字幕测试 41 | Dialogue: 0,0:00:15.00,0:00:16.00,OPCN,行对齐方式(正上方),0,0,0,,{\an8}字幕测试 42 | Dialogue: 0,0:00:16.00,0:00:17.00,OPCN,行对齐方式(右上角),0,0,0,,{\an9}字幕测试 43 | Dialogue: 0,0:00:17.00,0:00:18.00,OPCN,粗体(打开),0,0,0,,{\b1}字幕测试 44 | Dialogue: 0,0:00:18.00,0:00:19.00,OPCN,粗体(关闭),0,0,0,,{\b0}字幕测试 45 | Dialogue: 0,0:00:19.00,0:00:20.00,OPCN,边框模糊,0,0,0,,{\be2}字幕测试 46 | Dialogue: 0,0:00:20.00,0:00:21.00,OPCN,边缘模糊(高斯函数),0,0,0,,{\blur2}字幕测试 47 | Dialogue: 0,0:00:21.00,0:00:22.00,OPCN,边框宽度,0,0,0,,{\bord10}字幕测试 48 | Dialogue: 0,0:00:22.00,0:00:23.00,OPCN,边框宽度(横向),0,0,0,,{\xbord10}字幕测试 49 | Dialogue: 0,0:00:23.00,0:00:24.00,OPCN,边框宽度(纵向),0,0,0,,{\ybord10}字幕测试 50 | Dialogue: 0,0:00:24.00,0:00:25.00,OPCN,遮罩-显示(方形),0,0,0,,{\clip(740,470,960,620)}字幕测试 51 | Dialogue: 0,0:00:25.00,0:00:26.00,OPCN,遮罩-显示(矢量绘图),0,0,0,,{\clip(m 740 480 l 980 480 740 620)}字幕测试 52 | Dialogue: 0,0:00:26.00,0:00:27.00,OPCN,遮罩-不显示(方形),0,0,0,,{\iclip(740,470,960,620)}字幕测试 53 | Dialogue: 0,0:00:27.00,0:00:28.00,OPCN,遮罩-不显示(矢量绘图),0,0,0,,{\iclip(m 740 480 l 980 480 740 620)}字幕测试 54 | Dialogue: 0,0:00:28.00,0:00:29.00,OPCN,斜体(打开),0,0,0,,{\i1}字幕测试 55 | Dialogue: 0,0:00:29.00,0:00:30.00,OPCN,斜体(关闭),0,0,0,,{\i0}字幕测试 56 | Dialogue: 0,0:00:30.00,0:00:31.00,OPCN,渐变(淡入淡出),0,0,0,,{\fad(200,200)}字幕测试 57 | Dialogue: 0,0:00:31.00,0:00:32.00,OPCN,渐变(复杂),0,0,0,,{\fade(255,32,224,0,200,700,1000)}字幕测试 58 | Dialogue: 0,0:00:32.00,0:00:33.00,OPCN,字体名称,0,0,0,,{\fn思源黑体 Medium}字幕测试 59 | Dialogue: 0,0:00:33.00,0:00:34.00,OPCN,字体大小,0,0,0,,{\fs200}字幕测试 60 | Dialogue: 0,0:00:34.00,0:00:35.00,OPCN,水平缩放,0,0,0,,{\fscx200}字幕测试 61 | Dialogue: 0,0:00:35.00,0:00:36.00,OPCN,垂直缩放,0,0,0,,{\fscy200}字幕测试 62 | Dialogue: 0,0:00:36.00,0:00:37.00,OPCN,字符间距,0,0,0,,{\fsp20}字幕测试 63 | Dialogue: 0,0:00:37.00,0:00:38.00,OPCN,文本旋转-X轴,0,0,0,,{\frx30}字幕测试 64 | Dialogue: 0,0:00:38.00,0:00:39.00,OPCN,文本旋转-Y轴,0,0,0,,{\fry30}字幕测试 65 | Dialogue: 0,0:00:39.00,0:00:40.00,OPCN,文本旋转-Z轴,0,0,0,,{\frz30}字幕测试 66 | Dialogue: 0,0:00:40.00,0:00:41.00,OPCN,文本剪切变换-X轴,0,0,0,,{\fax-0.1}字幕测试 67 | Dialogue: 0,0:00:41.00,0:00:42.00,OPCN,文本剪切变换-Y轴,0,0,0,,{\fay-0.1}字幕测试 68 | Dialogue: 0,0:00:42.00,0:00:43.00,OPCN,字体字符集,0,0,0,,{\fe128}字幕测试 69 | Dialogue: 0,0:00:43.00,0:00:44.00,OPCN,卡拉OK效果-k,0,0,0,,{\k25}字{\k25}幕{\k25}测{\k25}试 70 | Dialogue: 0,0:00:44.00,0:00:45.00,OPCN,卡拉OK效果-K,0,0,0,,{\K25}字{\K25}幕{\K25}测{\K25}试 71 | Dialogue: 0,0:00:45.00,0:00:46.00,OPCN,卡拉OK效果-kf,0,0,0,,{\kf25}字{\kf25}幕{\kf25}测{\kf25}试 72 | Dialogue: 0,0:00:46.00,0:00:47.00,OPCN,卡拉OK效果-ko,0,0,0,,{\ko25}字{\ko25}幕{\ko25}测{\ko25}试 73 | Dialogue: 0,0:00:47.00,0:00:48.00,OPCN,移动设定,0,0,0,,{\move(960,540,1260,540)}字幕测试 74 | Dialogue: 0,0:00:48.00,0:00:49.00,OPCN,重置样式,0,0,0,,{\rOPCN}字幕测试 75 | Dialogue: 0,0:00:49.00,0:00:50.00,OPCN,软换行(软空格),0,0,0,,字幕\n测试 76 | Dialogue: 0,0:00:50.00,0:00:51.00,OPCN,硬换行符,0,0,0,,字幕\N测试 77 | Dialogue: 0,0:00:51.00,0:00:52.00,OPCN,硬空格,0,0,0,,字幕\h测试 78 | Dialogue: 0,0:00:52.00,0:00:53.00,OPCN,旋转中心,0,0,0,,{\org(640,540)\frz30\t(0,1000,\frz60)}字幕测试 79 | Dialogue: 0,0:00:53.00,0:00:54.00,OPCN,绘画标签(切换绘图模式),0,0,0,,{\p1}m 0 0 l 500 0 l 500 500 l 0 500 l 0 0 80 | Dialogue: 0,0:00:54.00,0:00:55.00,OPCN,绘画标签(基线偏移),0,0,0,,{\pbo-50\p1}m 0 0 l 500 0 l 500 500 l 0 500 l 0 0 81 | Dialogue: 0,0:00:55.00,0:00:56.00,OPCN,位置设定,0,0,0,,{\pos(960,100)}字幕测试 82 | Dialogue: 0,0:00:56.00,0:00:57.00,OPCN,删除线(打开),0,0,0,,{\s1}字幕测试 83 | Dialogue: 0,0:00:57.00,0:00:58.00,OPCN,删除线(关闭),0,0,0,,{\s0}字幕测试 84 | Dialogue: 0,0:00:58.00,0:00:59.00,OPCN,阴影宽度,0,0,0,,{\shad10}字幕测试 85 | Dialogue: 0,0:00:59.00,0:01:00.00,OPCN,阴影宽度(横向),0,0,0,,{\xshad10}字幕测试 86 | Dialogue: 0,0:01:00.00,0:01:01.00,OPCN,阴影宽度(纵向),0,0,0,,{\yshad10}字幕测试 87 | Dialogue: 0,0:01:01.00,0:01:02.00,OPCN,下划线(打开),0,0,0,,{\u1}字幕测试 88 | Dialogue: 0,0:01:02.00,0:01:03.00,OPCN,下划线(关闭),0,0,0,,{\u0}字幕测试 89 | Comment: 0,0:00:00.00,0:00:00.00,OPCN,,0,0,0,,--------------------以下为t标签的动画效果-------------------- 90 | Dialogue: 0,0:01:03.00,0:01:04.00,OPCN,主要颜色透明度,0,0,0,,{\1a&H00&\t(0,1000,\1a&HFF&)}字幕测试 91 | Dialogue: 0,0:01:04.00,0:01:05.00,OPCN,次要颜色透明度,0,0,0,,{\2a&H00&\t(0,1000,\2a&HFF&)\K100}字幕测试 92 | Dialogue: 0,0:01:05.00,0:01:06.00,OPCN,边框颜色透明度,0,0,0,,{\3a&H00&\t(0,1000,\3a&HFF&)}字幕测试 93 | Dialogue: 0,0:01:06.00,0:01:07.00,OPCN,阴影颜色透明度,0,0,0,,{\4a&H00&\t(0,1000,\4a&HFF&)\shad6}字幕测试 94 | Dialogue: 0,0:01:07.00,0:01:08.00,OPCN,主要颜色,0,0,0,,{\1c&H0096FF&\t(0,1000,\1c&HFFFFFF&)}字幕测试 95 | Dialogue: 0,0:01:08.00,0:01:09.00,OPCN,次要颜色,0,0,0,,{\2c&H0096FF&\t(0,1000,\2c&HFFFFFF&)\K100}字幕测试 96 | Dialogue: 0,0:01:09.00,0:01:10.00,OPCN,边框颜色,0,0,0,,{\3c&H0096FF&\t(0,1000,\3c&HFFFFFF&)}字幕测试 97 | Dialogue: 0,0:01:10.00,0:01:11.00,OPCN,阴影颜色,0,0,0,,{\4c&H0096FF&\t(0,1000,\4c&HFFFFFF&)\shad6}字幕测试 98 | Dialogue: 0,0:01:11.00,0:01:12.00,OPCN,边框宽度,0,0,0,,{\bord0\t(0,1000,\bord10)}字幕测试 99 | Dialogue: 0,0:01:12.00,0:01:13.00,OPCN,边框宽度(横向),0,0,0,,{\xbord0\t(0,1000,\xbord10)}字幕测试 100 | Dialogue: 0,0:01:13.00,0:01:14.00,OPCN,边框宽度(纵向),0,0,0,,{\ybord0\t(0,1000,\ybord10)}字幕测试 101 | Dialogue: 0,0:01:14.00,0:01:15.00,OPCN,阴影宽度,0,0,0,,{\shad0\t(0,1000,\shad10)}字幕测试 102 | Dialogue: 0,0:01:15.00,0:01:16.00,OPCN,阴影宽度(横向),0,0,0,,{\xshad0\t(0,1000,\xshad10)}字幕测试 103 | Dialogue: 0,0:01:16.00,0:01:17.00,OPCN,阴影宽度(纵向),0,0,0,,{\yshad0\t(0,1000,\yshad10)}字幕测试 104 | Dialogue: 0,0:01:17.00,0:01:18.00,OPCN,边框模糊,0,0,0,,{\be0\t(0,1000,\be30)}字幕测试 105 | Dialogue: 0,0:01:18.00,0:01:19.00,OPCN,边缘模糊(高斯函数),0,0,0,,{\blur0\t(0,1000,\blur30)}字幕测试 106 | Dialogue: 0,0:01:19.00,0:01:20.00,OPCN,遮罩-显示(方形),0,0,0,,{\clip(740,470,740,620)\t(0,1000,\clip(740,470,1200,620))}字幕测试 107 | Dialogue: 0,0:01:20.00,0:01:21.00,OPCN,遮罩-不显示(方形),0,0,0,,{\iclip(740,470,740,620)\t(0,1000,\iclip(740,470,1200,620))}字幕测试 108 | Dialogue: 0,0:01:21.00,0:01:22.00,OPCN,文本剪切变换-X轴,0,0,0,,{\fax0\t(0,1000,\fax0.1)}字幕测试 109 | Dialogue: 0,0:01:22.00,0:01:23.00,OPCN,文本剪切变换-Y轴,0,0,0,,{\fay0\t(0,1000,\fay0.1)}字幕测试 110 | Dialogue: 0,0:01:23.00,0:01:24.00,OPCN,文本旋转-X轴,0,0,0,,{\frx0\t(0,1000,\frx180)}字幕测试 111 | Dialogue: 0,0:01:24.00,0:01:25.00,OPCN,文本旋转-Y轴,0,0,0,,{\fry0\t(0,1000,\fry180)}字幕测试 112 | Dialogue: 0,0:01:25.00,0:01:26.00,OPCN,文本旋转-Z轴,0,0,0,,{\frz0\t(0,1000,\frz180)}字幕测试 113 | Dialogue: 0,0:01:26.00,0:01:27.00,OPCN,字体大小,0,0,0,,{\fs50\t(0,1000,\fs150)}字幕测试 114 | Dialogue: 0,0:01:27.00,0:01:28.00,OPCN,水平缩放,0,0,0,,{\fscx50\t(0,1000,\fscx150)}字幕测试 115 | Dialogue: 0,0:01:28.00,0:01:29.00,OPCN,垂直缩放,0,0,0,,{\fscy50\t(0,1000,\fscy150)}字幕测试 116 | Dialogue: 0,0:01:29.00,0:01:30.00,OPCN,字符间距,0,0,0,,{\fsp0\t(0,1000,\fsp20)}字幕测试 117 | 118 | -------------------------------------------------------------------------------- /test/readme.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oovm/vscode-subtitles/0ac07a7ce834cd12899351828d1f2e663a6440e1/test/readme.md -------------------------------------------------------------------------------- /test/极乐净土.srt: -------------------------------------------------------------------------------- 1 | 1 2 | 00:00:32,240 --> 00:00:35,100 3 | 此曲夜歌里 落寞与孤独 4 | 5 | 2 6 | 00:00:35,970 --> 00:00:39,000 7 | 灯朦胧暗淡 娇娥轻舞 8 | 9 | 3 10 | 00:00:39,680 --> 00:00:42,190 11 | 梦醉里百焰 喜怒哀楚 12 | 13 | 4 14 | 00:00:42,370 --> 00:00:45,620 15 | 呼唤你 缄默感 伸手引他出 16 | 17 | 5 18 | 00:00:45,620 --> 00:00:49,810 19 | 这一段萌动音乐 笔端勾勒 20 | 21 | 6 22 | 00:00:50,160 --> 00:00:52,990 23 | 迷诱其中了吧 无可脱身来 24 | 25 | 7 26 | 00:00:52,990 --> 00:00:57,100 27 | 感觉意识一同脱开 心跳已烂了 28 | 29 | 8 30 | 00:00:57,540 --> 00:01:00,540 31 | 我已经迈上薄空 那古旧沃土 32 | 33 | 9 34 | 00:01:00,540 --> 00:01:04,160 35 | 我的爱呀不答应 孤高冷漠漫万里 36 | 37 | 10 38 | 00:01:04,160 --> 00:01:08,500 39 | 爱的大陆狂欢舞洒 起歌生灯 40 | 41 | 11 42 | 00:01:08,300 --> 00:01:11,540 43 | 涌动的爱有多累 多期望我思恋 44 | 45 | 12 46 | 00:01:11,740 --> 00:01:16,170 47 | 空犹豫的梦呓 啊 苦恼你自己 48 | 49 | 13 50 | 00:01:30,980 --> 00:01:34,110 51 | 无助的亵看 盛开花乱落 52 | 53 | 14 54 | 00:01:34,620 --> 00:01:37,650 55 | 愿作歌祈礼 夜空默祷 56 | 57 | 15 58 | 00:01:38,200 --> 00:01:41,600 59 | 所恋的那个梦 一起幽舞 60 | 61 | 16 62 | 00:01:41,600 --> 00:01:44,260 63 | 梦舞动爱诚恳 爱意心答应 64 | 65 | 17 66 | 00:01:44,260 --> 00:01:48,570 67 | 娇艳倒映瞳眸 隐透馨闻香 68 | 69 | 18 70 | 00:01:48,840 --> 00:01:51,680 71 | 可委婉又哪堪 漫步那谁感 72 | 73 | 19 74 | 00:01:51,680 --> 00:01:55,710 75 | 谁梦每刻堕落 无垠世界 76 | 77 | 20 78 | 00:01:56,120 --> 00:01:59,260 79 | 勇气梦想哦 不哭啦 苦酒乐土 80 | 81 | 21 82 | 00:01:59,260 --> 00:02:02,850 83 | 怒涛呜咽混沌月 故国沦没蛮荒岭 84 | 85 | 22 86 | 00:02:03,500 --> 00:02:06,460 87 | 彼端的路跟你一起入清林深处 88 | 89 | 23 90 | 00:02:06,460 --> 00:02:10,140 91 | 涌动的爱 云冻裂 冬之夜野火肆虐 92 | 93 | 24 94 | 00:02:10,350 --> 00:02:14,290 95 | 可忧郁的末影 那枯荣已绽开 96 | 97 | 25 98 | 00:02:44,650 --> 00:02:48,830 99 | 娇怨地一叩眸 仰头心微笑 100 | 101 | 26 102 | 00:02:52,900 --> 00:02:56,410 103 | 我所忆梦空堕落 难以松开 104 | 105 | 27 106 | 00:02:56,410 --> 00:02:59,700 107 | 尤其梦醒后都看那故旧乐土 108 | 109 | 28 110 | 00:02:59,700 --> 00:03:03,290 111 | 你快来呀我的爱 苦苦落幕梦哪里 112 | 113 | 29 114 | 00:03:03,500 --> 00:03:07,180 115 | 爱的大陆狂欢舞洒 饥渴谁待 116 | 117 | 30 118 | 00:03:07,410 --> 00:03:10,840 119 | 涌动的爱有多累 托起你我思恋 120 | 121 | 31 122 | 00:03:10,840 --> 00:03:14,480 123 | 歌谣音的魔力 爱不能抑自己 124 | 125 | 32 126 | 00:03:14,480 --> 00:03:20,260 127 | 歌游吟爱难当 那歌舞映真情 128 | 129 | -------------------------------------------------------------------------------- /test/極樂淨土.lrc: -------------------------------------------------------------------------------- 1 | [ti:極樂淨土] 2 | [ar:GARNiDELiA] 3 | [al:sm28709142] 4 | [by:Aster] 5 | [00:00.00]GARNiDELiA - 極樂淨土 6 | [00:08.00] 7 | [00:15.00]Lyrcis & Vocals:MARiA(メイリア) 8 | [00:22.00]Compose, Instruments & Movie:toku(とくP) 9 | [00:28.00]Guitar:G.A.Cool @gacool 10 | [00:30.00] 11 | [00:32.39]月明かり昇る刻 12 | [00:36.00]灯る赤提灯 13 | [00:39.70]祭囃子の合図 14 | [00:42.39]ふわり 蝶が 誘い出す 15 | [00:45.61](ちょいと覗いて 見てごらん) 16 | [00:49.64] 17 | [00:50.27]迷い込めば 抜け出せない 18 | [00:53.00](楽しいことがしたいなら) 19 | [00:57.00] 20 | [00:57.59]おいでませ 極楽浄土 21 | [01:00.41] 22 | [01:00.88]歌えや歌え 心のままに 23 | [01:04.43]アナタの声を さぁ 聞かせて 24 | [01:08.36]踊れや踊れ 時を忘れ 25 | [01:11.74]今宵 共に あゝ狂い咲き 26 | [01:15.65] 27 | [01:29.00] 28 | [01:31.01]美しく咲く花も 29 | [01:34.70]いつか散りゆくもの 30 | [01:37.70] 31 | [01:38.28]それならこの一夜を 32 | [01:41.00]もっと 熱く 愛したい 33 | [01:44.32](ちょいと「いいこと」いたしましょう) 34 | [01:48.21] 35 | [01:48.85]これは夢か幻か 36 | [01:51.68](嘘も真も 無い世界) 37 | [01:55.74] 38 | [01:56.15]ゆきましょう 極楽浄土 39 | [01:59.15] 40 | [01:59.45]歌えや歌え 心のままに 41 | [02:03.00]乱れる髪、息も気にせず 42 | [02:07.06]踊れや踊れ 時を忘れ 43 | [02:10.37]今宵 共に あゝ狂い咲き 44 | [02:14.25] 45 | [02:42.77] 46 | [02:44.77](ちょいと「いいこと」いたしましょう) 47 | [02:49.13] 48 | [02:52.13](嘘も真も 無い世界) 49 | [02:56.30] 50 | [02:56.84]ゆきましょう 極楽浄土 51 | [02:59.63] 52 | [02:59.83]歌えや歌え 心のままに 53 | [03:03.56]アナタの声を さぁ 聞かせて 54 | [03:07.43]踊れや踊れ 時を忘れ 55 | [03:10.80]今宵 共に あゝ狂い咲き 56 | [03:14.51]今宵 アナタと狂い咲き 57 | [03:21.23] -------------------------------------------------------------------------------- /test/琪亚娜的极乐净土.ass: -------------------------------------------------------------------------------- 1 | [Script Info] 2 | ; Script generated by Aegisub 3.2.2 3 | ; http://www.aegisub.org/ 4 | YCbCr Matrix: TV.601 5 | PlayResX: 1920 6 | PlayResY: 1080 7 | 8 | [Aegisub Project Garbage] 9 | Last Style Storage: Default 10 | Audio File: 琪亚娜的极乐净土.mp4 11 | Video File: 琪亚娜的极乐净土.mp4 12 | Video AR Mode: 4 13 | Video AR Value: 1.777778 14 | Video Zoom Percent: 0.500000 15 | 16 | [V4+ Styles] 17 | Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, OutlineColour, BackColour, Bold, Italic, Underline, StrikeOut, ScaleX, ScaleY, Spacing, Angle, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, Encoding 18 | Style: Default,微软雅黑,64,&H00FFFFFF,&H000000FF,&H00000000,&H00000000,0,0,0,0,100,100,0,0,1,2,2,2,10,10,10,1 19 | 20 | [Events] 21 | Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text 22 | Comment: 0,0:00:00.00,0:00:32.24,Default,,0,0,0,, 23 | Dialogue: 0,0:00:32.24,0:00:35.10,Default,,0,0,0,,此曲夜歌里 落寞与孤独 24 | Dialogue: 0,0:00:35.97,0:00:39.00,Default,,0,0,0,,灯朦胧暗淡 娇娥轻舞 25 | Dialogue: 0,0:00:39.68,0:00:42.19,Default,,0,0,0,,梦醉里百焰 喜怒哀楚 26 | Dialogue: 0,0:00:42.37,0:00:45.62,Default,,0,0,0,,呼唤你 缄默感 伸手引他出 27 | Dialogue: 0,0:00:45.62,0:00:49.81,Default,,0,0,0,,这一段萌动音乐 笔端勾勒 28 | Dialogue: 0,0:00:50.16,0:00:52.99,Default,,0,0,0,,迷诱其中了吧 无可脱身来 29 | Dialogue: 0,0:00:52.99,0:00:57.10,Default,,0,0,0,,感觉意识一同脱开 心跳已烂了 30 | Dialogue: 0,0:00:57.54,0:01:00.54,Default,,0,0,0,,我已经迈上薄空 那古旧沃土 31 | Dialogue: 0,0:01:00.54,0:01:04.16,Default,,0,0,0,,我的爱呀不答应 孤高冷漠漫万里 32 | Dialogue: 0,0:01:04.16,0:01:08.05,Default,,0,0,0,,爱的大陆狂欢舞洒 起歌生灯 33 | Dialogue: 0,0:01:08.30,0:01:11.54,Default,,0,0,0,,涌动的爱有多累 多期望我思恋 34 | Dialogue: 0,0:01:11.74,0:01:16.17,Default,,0,0,0,,空犹豫的梦呓 啊 苦恼你自己 35 | Comment: 0,0:01:16.17,0:01:30.98,Default,,0,0,0,, 36 | Dialogue: 0,0:01:30.98,0:01:34.11,Default,,0,0,0,,无助的亵看 盛开花乱落 37 | Dialogue: 0,0:01:34.62,0:01:37.65,Default,,0,0,0,,愿作歌祈礼 夜空默祷 38 | Dialogue: 0,0:01:38.20,0:01:41.06,Default,,0,0,0,,所恋的那个梦 一起幽舞 39 | Dialogue: 0,0:01:41.06,0:01:44.26,Default,,0,0,0,,梦舞动爱诚恳 爱意心答应 40 | Dialogue: 0,0:01:44.26,0:01:48.57,Default,,0,0,0,,娇艳倒映瞳眸 隐透馨闻香 41 | Dialogue: 0,0:01:48.84,0:01:51.68,Default,,0,0,0,,可委婉又哪堪 漫步那谁感 42 | Dialogue: 0,0:01:51.68,0:01:55.71,Default,,0,0,0,,谁梦每刻堕落 无垠世界 43 | Dialogue: 0,0:01:56.12,0:01:59.26,Default,,0,0,0,,勇气梦想哦 不哭啦 苦酒乐土 44 | Dialogue: 0,0:01:59.26,0:02:02.85,Default,,0,0,0,,怒涛呜咽混沌月 故国沦没蛮荒岭 45 | Dialogue: 0,0:02:03.05,0:02:06.46,Default,,0,0,0,,彼端的路跟你一起入清林深处 46 | Dialogue: 0,0:02:06.46,0:02:10.14,Default,,0,0,0,,涌动的爱 云冻裂 冬之夜野火肆虐 47 | Dialogue: 0,0:02:10.35,0:02:14.29,Default,,0,0,0,,可忧郁的末影 那枯荣已绽开 48 | Comment: 0,0:02:14.29,0:02:44.65,Default,,0,0,0,, 49 | Dialogue: 0,0:02:44.65,0:02:48.83,Default,,0,0,0,,娇怨地一叩眸 仰头心微笑 50 | Comment: 0,0:02:48.83,0:02:52.09,Default,,0,0,0,, 51 | Dialogue: 0,0:02:52.09,0:02:56.41,Default,,0,0,0,,我所忆梦空堕落 难以松开 52 | Dialogue: 0,0:02:56.41,0:02:59.70,Default,,0,0,0,,尤其梦醒后都看那故旧乐土 53 | Dialogue: 0,0:02:59.70,0:03:03.29,Default,,0,0,0,,你快来呀我的爱 苦苦落幕梦哪里 54 | Dialogue: 0,0:03:03.50,0:03:07.18,Default,,0,0,0,,爱的大陆狂欢舞洒 饥渴谁待 55 | Dialogue: 0,0:03:07.41,0:03:10.84,Default,,0,0,0,,涌动的爱有多累 托起你我思恋 56 | Dialogue: 0,0:03:10.84,0:03:14.48,Default,,0,0,0,,歌谣音的魔力 爱不能抑自己 57 | Dialogue: 0,0:03:14.48,0:03:20.26,Default,,0,0,0,,歌游吟爱难当 那歌舞映真情 58 | Comment: 0,0:03:21.14,0:03:34.11,Default,,0,0,0,, 59 | -------------------------------------------------------------------------------- /tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "include": [ 3 | "source" 4 | ], 5 | "compilerOptions": { 6 | "outDir": "dist", 7 | /* Basic Options */ 8 | "target": "ES5", 9 | "module": "commonjs", 10 | "lib": ["esnext", "dom"], /* Specify library files to be included in the compilation. */ 11 | // "allowJs": true, /* Allow javascript files to be compiled. */ 12 | // "checkJs": true, /* Report errors in .js files. */ 13 | // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */ 14 | "declaration": true, /* Generates corresponding '.d.ts' file. */ 15 | "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ 16 | "sourceMap": true, /* Generates corresponding '.map' file. */ 17 | // "outFile": "./", /* Concatenate and emit output to single file. */ 18 | // "outDir": "./", /* Redirect output structure to the directory. */ 19 | // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ 20 | // "composite": true, /* Enable project compilation */ 21 | "removeComments": true, /* Do not emit comments to output. */ 22 | // "noEmit": true, /* Do not emit outputs. */ 23 | // "importHelpers": true, /* Import emit helpers from 'tslib'. */ 24 | // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ 25 | // "isolatedModules": true, /* Transpile each file as a separate module (similar to 'ts.transpileModule'). */ 26 | 27 | /* Strict Type-Checking Options */ 28 | "strict": true, /* Enable all strict type-checking options. */ 29 | // "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ 30 | // "strictNullChecks": true, /* Enable strict null checks. */ 31 | // "strictFunctionTypes": true, /* Enable strict checking of function types. */ 32 | // "strictBindCallApply": true, /* Enable strict 'bind', 'call', and 'apply' methods on functions. */ 33 | // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */ 34 | // "noImplicitThis": true, /* Raise error on 'this' expressions with an implied 'any' type. */ 35 | "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */ 36 | 37 | /* Additional Checks */ 38 | // "noUnusedLocals": true, /* Report errors on unused locals. */ 39 | // "noUnusedParameters": true, /* Report errors on unused parameters. */ 40 | // "noImplicitReturns": true, /* Report error when not all code paths in function return a value. */ 41 | // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */ 42 | 43 | /* Module Resolution Options */ 44 | //"resolveJsonModule": true, /* Import json as object. */ 45 | // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ 46 | // "baseUrl": "./", /* Base directory to resolve non-absolute module names. */ 47 | // "paths": {}, /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */ 48 | // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ 49 | // "typeRoots": [], /* List of folders to include type definitions from. */ 50 | // "types": [], /* Type declaration files to be included in compilation. */ 51 | // "allowSyntheticDefaultImports": true, /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */ 52 | "esModuleInterop": true, /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ 53 | // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */ 54 | 55 | /* Source Map Options */ 56 | // "sourceRoot": "", /* Specify the location where debugger should locate TypeScript files instead of source locations. */ 57 | // "mapRoot": "", /* Specify the location where debugger should locate map files instead of generated locations. */ 58 | // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */ 59 | // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */ 60 | 61 | /* Experimental Options */ 62 | "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */ 63 | "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */ 64 | }, 65 | "compileOnSave": true, 66 | } -------------------------------------------------------------------------------- /tslint.json: -------------------------------------------------------------------------------- 1 | { 2 | "rules": { 3 | "semicolon": [ 4 | true, 5 | "never" 6 | ], 7 | "quotemark": [ 8 | true, 9 | "single", 10 | "avoid-escape", 11 | "avoid-template" 12 | ], 13 | "indent": [ 14 | true, 15 | "spaces", 16 | 4 17 | ], 18 | "object-literal-key-quotes": [ 19 | true, 20 | "consistent-as-needed" 21 | ], 22 | "no-var-requires": true, 23 | "member-access": false, 24 | "trailing-comma": [ 25 | true, 26 | { 27 | "multiline": "always", 28 | "singleline": "never" 29 | } 30 | ] 31 | }, 32 | "linterOptions": { 33 | "exclude": [ 34 | "dist/**", 35 | "node_modules/**", 36 | "*.d.ts" 37 | ] 38 | } 39 | } --------------------------------------------------------------------------------