Skip to content

Long code lines do not wrap in PDF exports #2776

@Y0lan

Description

@Y0lan

Issuehunt badges

Large ligne of code are cut when the doc is formatted in PDF

Expected behavior

I think the line should not be cut, but instead the rest of the line that can not be shown on the screen must be shown on the next line.

Steps to reproduce

  1. write a code inside a md page like c some code

My code:

#!/bin/bash

#Fonction de création d'un utilisateur avec 5 à 10 fichiers de 10 à 100Mo
createUser()
(
	X=$(( 10 + $RANDOM % 31 ))
	user="user$X"
	if grep "$user" /etc/passwd > /dev/null;
		then echo -e "L'utilisateur $user existe déja, un autre sera créé à la place."
		else useradd $user --home /home/$user --create-home --shell /bin/bash > /dev/null;
		echo -e "nL'utilisateur $user avec le mot de passe $user a été créé."
		echo -e "$usern$user" | passwd $user 2> /dev/null;	
		fileNumber=$(( 5 + $RANDOM % 6 ))
		for f in `seq 1 $fileNumber`
		do
		fileSize=$(( 20 + $RANDOM % 100 ))
		fallocate -l $fileSizeM "/home/$user/fic$f"
			if [ -f /home/$user/fic$f ]
				then echo "Le fichier fic$f ($fileSize Mo) a bien été créé dans /home/$user"
					  createdFiles=$((createdFiles+1))
				else echo "Le fichier fic$f n'a pas été créé"
			fi
		done
		echo "$createdFiles/$fileNumber fichiers ont été créés dans /home/$user."
	fi
)

while [ `grep -c "^user" /etc/passwd` != 10 ]
	do
		createUser
	done
  1. export to pdf
  2. look at the code

Environment

  • Version : Boostnote 0.11.11
  • OS Version and name : Manjaro Linux
    4.19.13-1-MANJARO
    2019-01-03_19-31

There is a $30.00 open bounty on this issue. Add more on Issuehunt.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug 🐛Issue concerns a bug.funded on issuehunt 💵Issue has received funding that will be rewarded to the contributor solving this issue.level 1 ❕A bug that caused minor damage: App is still usable, but minor features might not work.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions