@@ -18,7 +18,7 @@ export const DEFAULT_SETTINGS: PluginSettings = {
18
18
regex : / [ - a - z A - Z 0 - 9 @ : % . _ \+ ~ # = ] { 1 , 256 } \. [ a - z A - Z 0 - 9 ( ) ] { 1 , 6 } \b ( [ - a - z A - Z 0 - 9 ( ) @ : % _ \+ . ~ # ? & / / = ] * ) /
19
19
. source ,
20
20
nothingSelected : NothingSelected . doNothing ,
21
- listForImgEmbed : ""
21
+ listForImgEmbed : "" ,
22
22
} ;
23
23
24
24
export class UrlIntoSelectionSettingsTab extends PluginSettingTab {
@@ -31,7 +31,9 @@ export class UrlIntoSelectionSettingsTab extends PluginSettingTab {
31
31
32
32
new Setting ( containerEl )
33
33
. setName ( "Fallback Regular expression" )
34
- . setDesc ( "Regular expression used to match URLs when default match fails." )
34
+ . setDesc (
35
+ "Regular expression used to match URLs when default match fails."
36
+ )
35
37
. addText ( ( text ) =>
36
38
text
37
39
. setPlaceholder ( "Enter regular expression here.." )
@@ -45,15 +47,13 @@ export class UrlIntoSelectionSettingsTab extends PluginSettingTab {
45
47
) ;
46
48
new Setting ( containerEl )
47
49
. setName ( "Behavior on pasting URL when nothing is selected" )
48
- . setDesc (
49
- "Auto Select: Automatically select word surrounding the cursor."
50
- )
50
+ . setDesc ( "Auto Select: Automatically select word surrounding the cursor." )
51
51
. addDropdown ( ( dropdown ) => {
52
52
const options : Record < NothingSelected , string > = {
53
53
0 : "Do nothing" ,
54
54
1 : "Auto Select" ,
55
55
2 : "Insert [](url)" ,
56
- 3 : "Insert <url>"
56
+ 3 : "Insert <url>" ,
57
57
} ;
58
58
59
59
dropdown
@@ -65,22 +65,26 @@ export class UrlIntoSelectionSettingsTab extends PluginSettingTab {
65
65
this . display ( ) ;
66
66
} ) ;
67
67
} ) ;
68
- new Setting ( containerEl )
69
- . setName ( 'Whitelist for image embed syntax' )
70
- . setDesc ( createFragment ( el => {
71
- el . appendText ( " will be used for URL that matches the following list." ) ;
72
- el . createEl ( 'br' ) ;
73
- el . appendText ( "Rules are regex-based, split by line break." )
74
- } ) )
68
+ new Setting ( containerEl )
69
+ . setName ( "Whitelist for image embed syntax" )
70
+ . setDesc (
71
+ createFragment ( ( el ) => {
72
+ el . appendText (
73
+ " will be used for URL that matches the following list."
74
+ ) ;
75
+ el . createEl ( "br" ) ;
76
+ el . appendText ( "Rules are regex-based, split by line break." ) ;
77
+ } )
78
+ )
75
79
. addTextArea ( ( text ) => {
76
80
text
77
- . setPlaceholder ( ' Example:\nyoutu\ .?be|vimeo' )
81
+ . setPlaceholder ( " Example:\nyoutu.?be|vimeo" )
78
82
. setValue ( plugin . settings . listForImgEmbed )
79
83
. onChange ( ( value ) => {
80
84
plugin . settings . listForImgEmbed = value ;
81
85
plugin . saveData ( plugin . settings ) ;
82
86
return text ;
83
- } )
87
+ } ) ;
84
88
text . inputEl . rows = 6 ;
85
89
text . inputEl . cols = 25 ;
86
90
} ) ;
0 commit comments