Hi all,
I've been testing out the new code snippets in the latest version of Flare (2020). We have customers who want to be able to copy the code from our guides and then into their own text editors, and they want the indentation in the code block to be preserved. Apparently, in YML, the indentation of the code lines is significant. I programmed a bit before becoming a writer, and no language I ever used depended on indentation -- that was just to make reading/maintaining the code easier for human readers. YML is not one of the choices for the language to use when inserting a code snippet, but I was wondering if any of the choices will preserve the indentation level of the lines in a block of code that is in a Code Snippet.
So, my question is whether ANY of the available choices for code language will preserve the indentation levels when customers copy the text from a PDF or HTML page.
Copy and paste Code Snippets -- preserving indentation
-
- Propeller Head
- Posts: 37
- Joined: Wed Mar 11, 2009 11:14 am
Re: Copy and paste Code Snippets -- preserving indentation
Hi,
I am trying out the code snippet feature as well. Using the XML language will preserve the indentation when the copy button is used in HTM files. Copying the code itself and pasting seems to work too. Note: When I click the Copy button in the code snippet the page jumps to the top. I hope this hickup will be fixed shortly.
Now I am just trying to figure out how to highlight certain parts of the code within the code snippet ...
I am trying out the code snippet feature as well. Using the XML language will preserve the indentation when the copy button is used in HTM files. Copying the code itself and pasting seems to work too. Note: When I click the Copy button in the code snippet the page jumps to the top. I hope this hickup will be fixed shortly.
Now I am just trying to figure out how to highlight certain parts of the code within the code snippet ...