View Single Post
Old 06-06-2025, 01:57 AM   #1
AxaRu
Member
AxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enoughAxaRu will become famous soon enough
 
Posts: 24
Karma: 624
Join Date: May 2013
Location: Moscow
Device: Kobo Aura H2o, Kobo Aura One, Kobo Forma
sigil ignores the pre-wrap tag and clears the document formatting

Bug.
Present in versions 2.5.0, 2.5.1, 2.5.2

Curent cersion: 2.5.2
Loaded Qt: 6.4.2

Tested on
OS: Linux Mint 22.1
Release: 22.1
Codename: xia

Bug description.

I have this class in my CSS file
Code:
p.function {
  white-space: pre-wrap;
  margin-top: 1.5em;
  font-family: listing;
  font-size: 0.9em;
  font-weight: normal;
  font-style: italic;
  text-align: left;
  color: darkblue;
  background-color: #CCFFFF;
  border-top: #00CCCC solid 2px;
}

In XHTML, I manually did the following formatting

Code:
    <p class="function">esp_err_t <span class="function_name">i2c_new_master_bus</span>(
        const i2c_master_bus_config_t *bus_config,
        i2c_master_bus_handle_t *ret_bus_handle)</p>
The resulting document looks like this
Click image for larger version

Name:	sigil_21_05_001.png
Views:	52
Size:	13.1 KB
ID:	216029

After I ran the Mend and Prettify All HTML Files command, Sigil removed all white space


Code:
    <p class="function">esp_err_t <span class="function_name">i2c_new_master_bus</span>( const i2c_master_bus_config_t *bus_config, i2c_master_bus_handle_t *ret_bus_handle)</p>
Аnd the resulting document looks like this
Click image for larger version

Name:	sigil_21_05_002.png
Views:	41
Size:	12.5 KB
ID:	216030
AxaRu is offline   Reply With Quote