While you're here, please consider supporting GamingOnLinux on:
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Reward Tiers: Patreon. Plain Donations: PayPal.
This ensures all of our main content remains totally free for everyone! Patreon supporters can also remove all adverts and sponsors! Supporting us helps bring good, fresh content. Without your continued support, we simply could not continue!
You can find even more ways to support us on this dedicated page any time. If you already are, thank you!
Login / Register
- Unofficial PC port of Zelda: Majora's Mask, 2 Ship 2 Harkinian has a big new release out
- Steam Controller 2 is apparently a thing and being 'tooled for a mass production' plus a new VR controller
- Half-Life: Blue Shift remake mod Black Mesa: Blue Shift - Chapter 5: Focal Point released
- Linux kernel 6.12 is out now with real-time capabilities, more gaming handheld support
- Steam Deck OLED: Limited Edition White and Steam Deck Australia have launched
- > See more over 30 days here
-
War Thunder adds stealth tech, ray tracing and graphics…
- M@GOid -
The Sci-Fi Shooters Humble Bundle is a top deal with Sy…
- tuubi -
The Sci-Fi Shooters Humble Bundle is a top deal with Sy…
- ElectricPrism -
S.T.A.L.K.E.R. 2: Heart of Chornobyl review - works on …
- Shmerl -
S.T.A.L.K.E.R. 2: Heart of Chornobyl review - works on …
- Xpander - > See more comments
- What do you want to see on GamingOnLinux?
- Ehvis - Weekend Players' Club 11/22/2024
- Xpander - Types of programs that are irritating
- Cyril - Our own anti-cheat list
- Liam Dawe - Spare gog keys
- on_en_a_gros - See more posts
View PC info
https://www.gamingonlinux.com/articles/surviving-mars-space-race-expansion-and-gagarin-free-update-have-released-working-well-on-linux.12977/comment_id=140815
I used the code tag for formatting... In preview, this allowed me to not ignore whitespace and all the numbers lines up. But when posted it started to ignore white space. So you probably have a difference in your stylesheets or a missing PRE tag in HTML.
View PC info
It appears as if the html/css formatting is not the problem here. The tags in both places appear to have the same markup and css structure.
The problem actually appears to be when you generate the HTML. When you "view source" on the article/comment page, the extra whitespace is stripped out completely. It does not show the whitespace because the page generating the HTML removes it.
However, the whitespace still exists in the database (or whatever method you use to store comments.) This is evident because if I go back and attempt to edit my comment, the whitespace still appears inside the textarea.
So in order to fix the problem, you need to determine where the whitespace is being stripped out. Most likely it is being done as a page directive when generating the whole page, or, it is probably being done when sanitizing the comment for output. (i.e. most likely where you strip harmful html tags from the posted comment.)
Of course to figure this out would require access to the actual server side source code used for the website which I don't have access too... (and you don't want to see my bill for this either :D )
View PC info
.preformatted {
font-family: monospace;
white-space: pre;
}
View PC info
Personally, I would still use the tag... It is still a valid tag in HTML 5 and it is quite useful in describing the contents withing the tag. Though, in modern CSS, I would probably make sure to use what you have as part of the tag itself instead of creating a class. (unless I wanted the class for different tags.)
code {
font-family: monospace;
white-space: pre;
}
That being said... the problem is not with the either the tag or the CSS in this case. The site is removing the extra spaces when creating the page. Using View source on the page will confirm this.
You can actually confirm by viewing the source on this page now that you used the code tag on it. Posting or editing a reply will confirm that the spaces still exist on the database when you go into the in page editor.
https://www.gamingonlinux.com/forum/topic/3851
When I edit/preview, it looks fine. When I view the post it is scrunched.
I've replaced the space characters with underscores so they can be seen clearly. Strange, a few spaces remained in the scrunched version as well.
Edit/Preview excerpt:
_____[lefttrigger]__________[righttrigger]
____[leftshoulder]__________[rightshoulder]
_____________[back][guide][start]
__________[dpup]________________[y]
___[dpleft]=||=[dpright]_____[x]___[b]
_________[dpdown]_______________[a]
____________[leftstick]__[rightstick]
__________(leftx,lefty)__(rightx,righty)
View excerpt:
[lefttrigger]_[righttrigger]
[leftshoulder]_[rightshoulder]
[back][guide][start]
[dpup]_[y]
[dpleft]=||=[dpright]_[x]_[b]
[dpdown]_[a]
[leftstick]_[rightstick]
(leftx,lefty)_(rightx,righty)
See it working below:
look ma lots of space
<pre>
<code>
My pre-formatted code
here.
</code>
</pre> test
dsfsdf
sdfdf
Side note: I still haven't gotten any replies on my opinion request. This is one of those cases where that is informative in itself. I was going to post some sample code, but there doesn't seem to be many programmers here or much interest in programming. I will post a notification in the programming forum when I post my library code at another site. Maybe somebody will be interested in that.
Here is a program, using my new library, which will show all gamepad events and their translations into ControllerDb/SDL names/values:
' Gambas module file
'=============================================================================
Public Sub Main()
'---- Show Fancy Stuff
Fancy.PrintInfo()
'---- Get List of Attached Gamepads/Joysticks
Dim theGamePadList As String[]
theGamePadList = GamePadClass.GetTitleList()
'---- Build Array of GamePad Objects
Dim theGamePads As New GamePadClass[theGamePadList.Count]
Dim g As Integer
For g = 0 To theGamePadList.Max
Print theGamePadList[g]
theGamePads[g] = GamePadClass.Open(g)
Next
'---- Implement Event Loop
Dim t As Integer
Dim theGamePad As GamePadClass
For t = 0 To 600
For g = 0 To theGamePads.Max
theGamePad = theGamePads[g]
GoSub GamePadTimerTick
Next
Sleep 0.1
Next
'---- Exit
Print "All done!"
Return
'-----------------------------------------------------------------------------
GamePadTimerTick:
Do Until theGamePad.GetFancyEvent() < 0
GoSub ShowGamePadEvent
Loop
Return
'-----------------------------------------------------------------------------
ShowGamePadEvent:
Print g;;
Print theGamePad.MyGPE.EvdevType;;
Print theGamePad.MyGPE.EvdevCode,
Print theGamePad.MyGPE.EvdevValue,
Print theGamePad.MyGPE.Kind;;
Print theGamePad.MyGPE.Number,
Print theGamePad.MyGPE.Value,
Print theGamePad.MyGPE.Entry,
Print theGamePad.MyGPE.TimeSec
Return
End
'=============================================================================
Post Edit:
The intitial posting of this squeezed out all the blank lines. Going back and introducing a couple of spaces on each blank line preserves the line so it now looks okay. (This shouldn't be necessary.)
Also, when in edit mode, the button you think would say "Save" and works like it says "Save" has the label "Edit".
I've also adjusted the text there to be clearer and match the text on comment editing.