Please stop injecting linebreaks around code blocks between edits (or in any case)

Engaged ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

Real pet peeve of mine as someone who uses the forum primarily for scripting. Every single time I post a code block and I need to edit this post in any way, the forum injects <br> tags above and beneath the code block. If my original response was something to the effect of:

<span>Some text with a tyop in it</span>
<br>
<code>var code = "goes here"</code>
<br>
<span>More text</span>


Upon editing the post, the result becomes:

<span>Some text with a typo in it</span>
<br>
<br>
<code>var code = "goes here"</code>
<br>
<br>
<span>More text</span>

 

Then upon editing it again, the result becomes:

<span>Some text with a typo in it</span>
<br>
<br>
<br>
<code>var code = "goes here"</code>
<br>
<br>
<br>
<span>More text because maybe I need to clarify or elaborate something, or correct a typo in my code</span>


This means that every time I edit a post, I have to wait for it to submit, then edit it again and delete all the linebreaks, then submit it a second time and accept default single linebreaks. I have to edit twice per one modification.

This is clearly some oversight in the forum software where any <pre> or <code> block automatically injects <br> tags, which:

 

  1. Is completely unnecessary. Adobe should not be injecting anything (especially as redundant as <br> tags) into my post.
  2. In the case it would seem necessary (like when spans and code blocks have no linebreak), should only be done if a linebreak does not exist. Right now, the forum doesn't check or care and that's pretty sloppy work from somewhere. It just haphazardly sandwiches all code blocks with additional slices of linebreak bread no matter how many you already have, every single time you edit or post.
TOPICS
Bug

Views

96

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

For example, look at this:

 

 

 

 

<span>This used to look normal with one linebreak above and below</span>

 

 

 

 

 

I have to post single line snippets very often. I'm going to edit this particular post a few times to demonstrate.

Edit 1: I haven't touched anything above this line. The code block began with a single linebreak above and below, concise, correct, and easy to read.

Edit 2: See all this padding? It gets out of hand very quickly when you make just two edits (which is common in complex posts about programming). It makes it hard to read and it makes me want to not use the forum software, which is a shame because it has the best community.

 

Edit 3: Imagine if I had 3 blocks above instead of only one. I have to pretty often, to demonstrate and talk about specific lines of code. I have to manually go through and trim every single one because of this linebreak injection nonsense.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

For the record, I know these are <p>&nbsp;</p> and not <br> tags, but I think the point about not wanting the forum to auto-inject linebreaks in any scenario (it has never once benefitted me) still stands, and the implementation isn't done well enough to be considered a feature rather than a bug. It seems like an oversight.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

Adobe rents the program used for this forum, so Adobe has no control how the forum software works

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

They can still submit a support ticket. I have no other place to point this out and there's plenty broken about the software specifically in the context of code that's downright sloppy. Linebreaks above, the fact that pressing Translate breaks code blocks, that you're prompted for language selection in code blocks and are shown a preview of syntax highlighting which immediately disappears when you post, oAuth prompting me to sign in but auto-logging in and interrupting me as I type, etc. I've been very underwhelmed since they revamped the forums.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 13, 2021 Jul 13, 2021

Copy link to clipboard

Copied

Submitted for your approval, stop re-editing your posts lest your next stop could be the Twilight Zone! 🙂

 

But seriously, as a workaround you can click the HTML button to clean up your post's source code.  See screenshot.

image.png

 

In terms of priority, I think the forum translator / code bug is a bigger concern.  I hope they fix that one first.

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Hi Nancy, isn't that an ACP exclusive feature? My editor doesn't include anything in the toolbar beyond quote:

 

ice_screenshot_20210714-041612.png

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

Are you using mobile or desktop?  Which browser?

 

 

Nancy O'Shea, Adobe Product User & Community Professional
Alt-Web Design & Publishing ~ Web : Print : Graphics : Media

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Jul 14, 2021 Jul 14, 2021

Copy link to clipboard

Copied

LATEST

Chrome desktop. I remember during the transition of forum software, this was one of my biggest issues -- Erin Finnegan had told us that we wouldn't be able to have rich text or HTML unless we were ACP (a shame because I used to be able to copy/paste from VSCode and have beautiful syntax highlighting in my posts for all code). As far as I know that's an ACP exclusive feature and not for general users.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines