Page 1 of 1

The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 2:34 pm
by Drag
Please, I'm begging you. In content.css, for .codebox code, please eliminate or override the property max-height. I have no idea why the default behavior of the code box is to restrict how many lines you can see at once, was there ever a use case which required this? It's especially painful for assembly code.

Either that, or cram a second stylesheet to override max-hight to initial.

Code: Select all

; Start-up / Reset code
; A, X, Y are all 0 at the end of this routine
vct_reset ;bs
 sei			; Inhibit interrupts
 cld			; Disable decimal mode
 ldx #$FF
 txs			; Initialize stack pointer to bottom of stack
 inx			; Set X to 0
 lda #$40
 sta $4017		; Inhibit APU IRQ
 txa			; Set A to 0 (from X)
 sta $2001		; Disable all screen rendering
 sta $2000		; Turn off vblank NMI
 sta $4010		; Disable DMC IRQ
vct_reset_ram_init_loop
 sta $00,x		; I saved a single byte. Go me!
 sta $0100,x	; Clear deck ram with $00s
 sta $0200,x
 sta $0300,x
 sta $0400,x
 sta $0500,x
 sta $0600,x
 sta $0700,x
 inx
 bne vct_reset_ram_init_loop
 ldy #$03		; Wait for 3 vblanks, for the PPU to ready itself
vct_reset_ppu_stabilize
 bit $2002
 bpl vct_reset_ppu_stabilize
 dey
 bne vct_reset_ppu_stabilize
 jmp game_init
;be

Re: The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 2:45 pm
by rainwarrior
I completely agree. In a previous thread where this was discussed I left a snippet of CSS override you can use with the Stylus plugin to remove the limit:
viewtopic.php?p=245873#p245873

Re: The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 2:49 pm
by Drag
Oh snap, I didn't see that there were already two threads on the matter. :P

Well, here's thread #3 I suppose.

Re: The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 2:55 pm
by lidnariq
Is this even a bit that admins can change, or does it require that we get someone with shell access?

Re: The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 9:21 pm
by Drag
I think it requires touching a file on the server, no matter what.

Re: The [code] tag should not have its height limited

Posted: Fri Sep 04, 2020 9:41 pm
by lidnariq
So we need to get in contact with WhoaMan somehow to fix this?

Re: The [code] tag should not have its height limited

Posted: Sun Sep 06, 2020 2:56 am
by Memblers
lidnariq wrote:
Fri Sep 04, 2020 9:41 pm
So we need to get in contact with WhoaMan somehow to fix this?
Yes, that's the only way now. Previous version of phpBB used to allow editing through the admin control panel, but it only saved to a cached copy. Next time someone hits the "flush cache" button (or whatever else could cause that), the changes would be lost. I guess that caused enough problems for people that they took the feature out entirely.

Re: The [code] tag should not have its height limited

Posted: Sun Sep 06, 2020 7:23 am
by dougeff
However, if someone wants to post very long code, I suggest you either post a text file as an attachment, or use a repository for clips of code like Gist.

I would define very long code as more than 100 lines.

And when you reply to very long code, don't quote the entire post, or we get multiple duplicates of the code.

Re: The [code] tag should not have its height limited

Posted: Sun Sep 06, 2020 9:41 am
by Controllerhead
dougeff wrote:
Sun Sep 06, 2020 7:23 am
And when you reply to very long code, don't quote the entire post, or we get multiple duplicates of the code.
Good point. "Fixing" this code limit would cause some very sloppy looking hard to read threads.

Threads and posts like this one would look terrible:
viewtopic.php?f=2&t=20580#p253874

I propose doubling it (or so) from it's current 13 line limit to around 25 / 30 lines. 30 seems appropriate.

Re: The [code] tag should not have its height limited

Posted: Sun Sep 06, 2020 5:04 pm
by Dwedit
Perhaps nesdev should switch to a host that's actually administrated by someone who isn't absentee?