Splunk Search

Why does "Ask a Question" page merge some lines?

woodcock
Esteemed Legend

I had a perfectly coherent question but when I clicked the "Ask Your Question" button, I saw that the most important text of the body, the stuff that was from inside the *.conf files, had been reformatted and all lines merged! Why did it do that? How can I prevent it? My simple question now looks like barf and I am sure nobody will bother answering it, all because of a lame web-engine setting!

See barf here: http://answers.splunk.com/questions/8740/can-fieldalias-be-used-without-extract-i-e-on-fields-create...

1 Solution

V_at_Splunk
Splunk Employee
Splunk Employee

hi woodcock,

The simple answer is, MarkDown [the wiki engine on this site] tries to "help" you by collapsing whitespace.

This little script that will help you out, by re-formatting your code snippet for mangle-free posting.


:-)

cheers,

V

View solution in original post

0 Karma

V_at_Splunk
Splunk Employee
Splunk Employee

hi woodcock,

The simple answer is, MarkDown [the wiki engine on this site] tries to "help" you by collapsing whitespace.

This little script that will help you out, by re-formatting your code snippet for mangle-free posting.


:-)

cheers,

V

0 Karma

kmattern
Builder

I had the same problem. But not knowing about the code button, or four spaces, I use the HTML <pre> tag to format my data such as:

<pre>
Item 1
Item 2
Item 3
</pre>

It works like a charm.

0 Karma

dwaddle
SplunkTrust
SplunkTrust

The answers site editor lets you tell it things are "code" by indenting them with 4 spaces. Text marked up as code gets formatted with a fixed-width font and with the line breaks you intended.

The easiest way to do this is to paste your stuff in, highlight it, and press the "code" button on the editing button bar. The "code" button is the 5th button from the left and looks like a string of 1's and 0's. Below is an example of how it formats 'code':

[foo]
hi there
blah

It's not uncommon for a moderator to come by and edit your text for formatting if you've pasted in config snippets that have gotten garbled. But, you are absolutely correct that an easy to read question makes folks more likely to answer.

Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...