File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -127,13 +127,16 @@ function addMessage(message: string) {
127127
128128function viewPaste ( content : string , views : string ) {
129129 lineNumbers . innerHTML = ""
130- for ( let i = 1 ; i <= content . split ( "\n" ) . length ; i ++ ) {
131- lineNumbers . innerHTML = lineNumbers . innerHTML + `${ i } <br>`
132- }
133- if ( content . startsWith ( "---" ) || content . startsWith ( "md " ) || content . startsWith ( "md\n" ) ) {
130+ if (
131+ content . startsWith ( "---" ) ||
132+ content . startsWith ( "md " ) ||
133+ content . startsWith ( "md\n" )
134+ ) {
134135 codeView . innerHTML = marked . parse ( content . substring ( 3 ) )
135- hide ( lineNumbers )
136136 } else {
137+ for ( let i = 1 ; i <= content . split ( "\n" ) . length ; i ++ ) {
138+ lineNumbers . innerHTML = lineNumbers . innerHTML + `${ i } <br>`
139+ }
137140 codeView . innerHTML = hljs . highlightAuto ( content ) . value
138141 }
139142
You can’t perform that action at this time.
0 commit comments