mirror of
https://github.com/discourse/discourse.git
synced 2025-05-26 05:22:43 +08:00
Allow whitespace around % scaler in markdown image syntax (#5000)
This commit is contained in:
@ -104,7 +104,7 @@ function setupHoister(md) {
|
||||
md.renderer.rules.html_raw = renderHoisted;
|
||||
}
|
||||
|
||||
const IMG_SIZE_REGEX = /^([1-9]+[0-9]*)x([1-9]+[0-9]*)(,([1-9][0-9]?)%)?$/;
|
||||
const IMG_SIZE_REGEX = /^([1-9]+[0-9]*)x([1-9]+[0-9]*)(\s*,\s*([1-9][0-9]?)%)?$/;
|
||||
function renderImage(tokens, idx, options, env, slf) {
|
||||
var token = tokens[idx];
|
||||
|
||||
|
Reference in New Issue
Block a user