File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ func (w *jsonOutputter) EndMap() {
168168 }
169169 w .pop ()
170170 w .newline ()
171- w .Print ( w .tabs () + "}" )
171+ w .Printf ( "<span class= \" cp \" >%s</span>}" , w .tabs ())
172172 w .key = false
173173 w .name = ""
174174 w .unfresh ()
@@ -188,7 +188,7 @@ func (w *jsonOutputter) EndArray() {
188188 }
189189 w .pop ()
190190 w .newline ()
191- w .Print ( w .tabs () + "]" )
191+ w .Printf ( "<span class= \" cp \" >%s</span>]" , w .tabs ())
192192 w .key = false
193193 w .unfresh ()
194194}
@@ -223,14 +223,13 @@ func (w *jsonOutputter) Fresh() bool {
223223}
224224
225225func (w * jsonOutputter ) push () {
226- w .Print (w . tabs () + `<div class="indent">` + "\n " )
226+ w .Print (`<div class="indent">` + "\n " )
227227 w .fresh = append (w .fresh , true )
228228}
229229
230230func (w * jsonOutputter ) pop () {
231231 w .fresh = w .fresh [:len (w .fresh )- 1 ]
232232 w .newline ()
233- w .Print (w .tabs ())
234233 w .undiv ()
235234}
236235
@@ -288,7 +287,7 @@ func (w *jsonOutputter) newline() {
288287}
289288
290289func (w * jsonOutputter ) div () {
291- w .Print (w .tabs () + "<div >" )
290+ w .Print ("<div><span class= \" cp \" >" + w .tabs () + "</span >" )
292291}
293292
294293func (w * jsonOutputter ) undiv () {
Original file line number Diff line number Diff line change @@ -249,6 +249,10 @@ pre {
249249 margin-left: 2em;
250250}
251251
252+ .cp {
253+ font-size: 0;
254+ }
255+
252256.noselect {
253257 user-select: none;
254258 -webkit-user-select: none;
You can’t perform that action at this time.
0 commit comments