@@ -81,7 +81,7 @@ sf.tags = [
81
81
{
82
82
"name" : "help" ,
83
83
"help" : true ,
84
- "src" : "https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/icons/Development/bug-line .svg" ,
84
+ "src" : "https://raw.githubusercontent.com/Remix-Design/RemixIcon/master/icons/Editor/question-mark .svg" ,
85
85
"ignore" : true
86
86
}
87
87
] ;
@@ -112,7 +112,7 @@ sf.init = function() {
112
112
icon . src = sf . tags [ t ] . src ;
113
113
114
114
// Help icon
115
- if ( sf . tags [ t ] . help ) {
115
+ if ( sf . tags [ t ] . help == true ) {
116
116
icon . style . float = "right" ;
117
117
icon . onclick = function ( ) {
118
118
// Popup message HTML got a bit out of hand here
@@ -179,6 +179,8 @@ sf.init = function() {
179
179
if ( event . target . parentElement . children [ 0 ] . id !== "formatter" ) {
180
180
event . target . parentElement . prepend ( sf . formatter ) ;
181
181
sf . formatter . style . width = event . target . offsetWidth + "px" ;
182
+ event . target . style . resize = "auto" ;
183
+
182
184
}
183
185
}
184
186
}
@@ -216,6 +218,13 @@ sf.format = function() {
216
218
}
217
219
}
218
220
221
+ sf . parseMD = function ( text ) {
222
+ // Bold, then italics
223
+ text = text . replace ( / \* \* ( .* ) \* \* / gm, "<b>$1</b>" ) ;
224
+ text = text . replace ( / \* ( .* ) \* / gm, "<b>$1</b>" ) ;
225
+ return text ;
226
+ }
227
+
219
228
// Custom regex SFML* parser. It parses differently than HTML. Instead
220
229
// Of replacing [b] with <b>, it it replaces both tags with
221
230
// text between them. Therefore, "[b][b]Hello[/b][/b]" will not work.
@@ -262,5 +271,7 @@ sf.parse = function(text) {
262
271
// Format trailing breaklines and spaces
263
272
text = text . replace ( / ^ ( \n | ) + / gm, "" ) ;
264
273
274
+ text = sf . parseMD ( text ) ;
275
+
265
276
return text ;
266
277
}
0 commit comments