- Issue created by @mherchel
- π«π·France pdureau Paris
Hi Mike, thanks for the ticket.
It should show any errors (like maybe using source() instead of include())
I agree, there is 2 things to do here:
- Prevent crashing when the first parameter of include function is an expression instead of string scalar. Example:
include(componentMetadata.path ~ '/images/pager-first.svg')
- Add a warning when include function is used for an SVG file
Logic proposal for this warning
- The first parameter of the
include
function is a string scalar: -
- Raise a warning if the string is not a full (
provider:component
) component ID: "Include function must only be used for component inclusion."
- Raise a warning if the string is not a full (
- The first parameter of the
include
function is a CONCAT expression: -
- Raise a warning if (the last part of the expression is a string ending by ".svg") AND there is no other parameters in the
include
function: "Use source() function instead of include() to embed an SVG"
- Raise a warning if (the last part of the expression is a string ending by ".svg") AND there is no other parameters in the
(the last part of the expression of the first parameter of an
include
function is - Prevent crashing when the first parameter of include function is an expression instead of string scalar. Example: