Text with Code-tags displayed differently
-
When I change my own posting and saving it, "code" will be displayed differently and much favorably to me. Also I can hover over it and a copy shortcut is displayed.
Sadly when I reload the page again, it is all gone.
-
When you use the code block it defaults to a generic automatic lexer for syntax highlighting that isn't always accurate. You can override that by specifying the lexer to use immediately after the opening three backticks.
```config
blahblahblah
```
You can try different ones like
shell
,diff
,php
and other languages. If you want to strip the formatting and go plain you can usetext
as well.I rarely rely on the automatic behavior since it often guesses wrong (especially for shell input/output prompts)
-
Testing....
Shell:
*** Welcome to pfSense 2.7.0-RELEASE (amd64) on t70 *** WAN (wan) -> igb0 -> v4/DHCP4: 172.21.16.226/24 LAN (lan) -> igb1 -> v4: 192.168.226.1/24 OPT1 (opt1) -> igb2 -> v4: 10.112.20.1/26 SWITCH (opt2) -> igb3 -> v4: 192.168.70.1/25 VLAN229 (opt3) -> igb0.229 -> v4: 10.229.0.10/24 VTI0 (opt9) -> ipsec1 -> v4: 10.66.11.1/30 OPT10 (opt10) -> pppoe0 -> VLAN50 (opt11) -> igb1.50 -> v4: 10.10.50.10/26 0) Logout (SSH only) 9) pfTop 1) Assign Interfaces 10) Filter Logs 2) Set interface(s) IP address 11) Restart webConfigurator 3) Reset webConfigurator password 12) PHP shell + pfSense tools 4) Reset to factory defaults 13) Update from console 5) Reboot system 14) Disable Secure Shell (sshd) 6) Halt system 15) Restore recent configuration 7) Ping host 16) Restart PHP-FPM 8) Shell Enter an option: Connection to t70 closed.
Auto:
*** Welcome to pfSense 2.7.0-RELEASE (amd64) on t70 *** WAN (wan) -> igb0 -> v4/DHCP4: 172.21.16.226/24 LAN (lan) -> igb1 -> v4: 192.168.226.1/24 OPT1 (opt1) -> igb2 -> v4: 10.112.20.1/26 SWITCH (opt2) -> igb3 -> v4: 192.168.70.1/25 VLAN229 (opt3) -> igb0.229 -> v4: 10.229.0.10/24 VTI0 (opt9) -> ipsec1 -> v4: 10.66.11.1/30 OPT10 (opt10) -> pppoe0 -> VLAN50 (opt11) -> igb1.50 -> v4: 10.10.50.10/26 0) Logout (SSH only) 9) pfTop 1) Assign Interfaces 10) Filter Logs 2) Set interface(s) IP address 11) Restart webConfigurator 3) Reset webConfigurator password 12) PHP shell + pfSense tools 4) Reset to factory defaults 13) Update from console 5) Reboot system 14) Disable Secure Shell (sshd) 6) Halt system 15) Restore recent configuration 7) Ping host 16) Restart PHP-FPM 8) Shell Enter an option: Connection to t70 closed.
-
No difference I can see. In both cases it shows the code box differently only on first viewing.
Edit: Huh, after posting that reply they initially show as expected. But then revert back after refreshing the page.
-
@stephenw10 said in Text with Code-tags displayed differently:
In both cases it shows the code box differently only on first viewing.
Right! So something could be optimized I guess. The "first" view is the best in my eyes.
-
Hmm, wonder what happens with others.
Diff:
diff --git a/src/etc/inc/openvpn.inc b/src/etc/inc/openvpn.inc index 0281a094cb..1e63e3dfbf 100644 --- a/src/etc/inc/openvpn.inc +++ b/src/etc/inc/openvpn.inc @@ -899,7 +899,7 @@ function openvpn_reconfigure($mode, $settings) { // OpenVPN defaults to SHA1, so use it when unset to maintain compatibility. $digest = !empty($settings['digest']) ? $settings['digest'] : "SHA1"; - $interface = get_failover_interface($settings['interface']); + $interface = $settings['interface']; // The IP address in the settings can be an IPv4 or IPv6 address associated with the interface $ipaddr = $settings['ipaddr'];
PHP:
require_once('guiconfig.inc'); require_once('functions.inc'); require_once('notices.inc'); require_once("pkg-utils.inc");
-
Not sure if it's related, but when I have the browser debug console open and bring up the editor where it shows, it has a log entry saying it's initializing highlight.js.
But when loading the page directly it hits a JS error:
Uncaught (in promise) TypeError: config.theme is undefined
And other processing seems to die there.
So it may be a NodeBB issue, though I'm not seeing any other hits on that error (other than someone here on the forum mentioning it back in June).
-
Looks like a NodeBB bug
https://github.com/NodeBB/NodeBB/issues/11708
There is already a fix committed so hopefully should be in whatever upgrade we do next.
-
Aha, nice find!