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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...