I know that there is a non breaking whitespace -  . Is there a non-breaking dash (-) I can use so that my word doesn't wrap (break) at that location. Also can someone point me to a list with characters that are considered with priority when breaking a sentence ( like a whitespace). Thanks in advance :)
            Asked
            
        
        
            Active
            
        
            Viewed 1.8k times
        
    13
            
            
         
    
    
        user3719857
        
- 1,083
- 4
- 16
- 45
1 Answers
20
            Use ‑ instead of -, see the following example:
.box {
  border:1px solid #000;
  width:40px;
  word-wrap:normal;
}<div class="box">
  This is a test‑case / test-case
</div> 
    
    
        Sebastian Brosch
        
- 42,106
- 15
- 72
- 87
- 
                    Good attempt, but if a question is marked as duplicate is better following mark duplicated, instead of copy the answer and put it here. I upvote because is correct, but that's a duplicated question – Marcos Pérez Gude Jan 14 '16 at 13:57
- 
                    4It's not a duplicate because a hyphen is different from a dash. For anyone else happening across this page looking for a non-breaking _dash_, try here: https://ask.libreoffice.org/en/question/124347/non-breaking-en-dash/ – Eriyu Sep 26 '19 at 15:56
- 
                    the code snippet shows as either an empty box or a question mark for me. I'm running chrome latest on m1 macbook pro. – Fiddle Freak Nov 12 '21 at 18:53
- 
                    @Eriyu following that reasoning, this question also was not a duplicate. – Cadoiz Feb 21 '22 at 11:00