Problem with regex Pattern Matching in Transform Style

Bug #1825764 reported by Jonathan Schmidt on 2019-04-21
This bug affects 1 person
Affects Status Importance Assigned to Milestone

Bug Description

I set up a rule for transforming styles:

font-size matches pattern (.+)\s*rem change the value to \1em

It's in a copyrighted book, so here are excerpts of the css:

span.signUpButton {
  width: 160px;
  height: 40px;
  border-radius: 5px;
  background: rgb(106, 115, 123);
  padding: 8px 24px;
  text-decoration: none;
  font-size: 1.2rem;
  border: 1px solid #444;
  -webkit-box-shadow: 0 0 5px #aaa inset;


.signupbutton {
    -webkit-box-shadow: 0 0 5px #aaa inset;
    background: rgb(106, 115, 123);
    border-bottom-color: #444;
    border-bottom-style: solid;
    border-bottom-width: 1px;
    border-left-color: #444;
    border-left-style: solid;
    border-left-width: 1px;
    border-radius: 5px;
    border-right-color: #444;
    border-right-style: solid;
    border-right-width: 1px;
    border-top-color: #444;
    border-top-style: solid;
    border-top-width: 1px;
    height: 40px;
    padding-bottom: 8px;
    padding-left: 24px;
    padding-right: 24px;
    padding-top: 8px;
    text-decoration: none;
    width: 160px

And, receove this error:

ERROR: CSS: PropertyValue: Missing token for production Choice(ColorValue, Dimension, URIValue, Value, variable, MSValue, CSSCalc, function): (u'CHAR', u'\x1e', 387, 16)    [stylesheet.css]

Copying the transformed CSS to a text editor reveals that there is indeed a hidden Unicode character right before the "m".

Jonathan Schmidt (jonnie-cache) wrote :

Fixed in branch master. The fix will be in the next release. calibre is usually released every alternate Friday.

 status fixreleased

Changed in calibre:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments