(app, config)
| 182 | |
| 183 | |
| 184 | def _config_inited(app, config): |
| 185 | # Check for srcset hidpi images |
| 186 | for i, size in enumerate(app.config.mathmpl_srcset): |
| 187 | if size[-1] == 'x': # "2x" = "2.0" |
| 188 | try: |
| 189 | float(size[:-1]) |
| 190 | except ValueError: |
| 191 | raise ConfigError( |
| 192 | f'Invalid value for mathmpl_srcset parameter: {size!r}. ' |
| 193 | 'Must be a list of strings with the multiplicative ' |
| 194 | 'factor followed by an "x". e.g. ["2.0x", "1.5x"]') |
| 195 | else: |
| 196 | raise ConfigError( |
| 197 | f'Invalid value for mathmpl_srcset parameter: {size!r}. ' |
| 198 | 'Must be a list of strings with the multiplicative ' |
| 199 | 'factor followed by an "x". e.g. ["2.0x", "1.5x"]') |
| 200 | |
| 201 | |
| 202 | def setup(app): |
no outgoing calls
no test coverage detected
searching dependent graphs…