Skip to content

Commit

Permalink
removed regular expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
AnasSarkiz committed Oct 1, 2024
1 parent 2f8dff1 commit da442d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,6 @@ export function createSvgObjectsFromPcbFabricationNoteText(
const transformedFontSize = font_size * Math.abs(transform.a)

// Remove ${} from text value and handle undefined text
const cleanedText = (text || "").replace(/\$\{|\}/g, "")
if (!cleanedText) {
return []
}

// Create a composite transformation
const textTransform = compose(
Expand All @@ -66,7 +62,7 @@ export function createSvgObjectsFromPcbFabricationNoteText(
children: [
{
type: "text",
value: cleanedText,
value: text,
name: "",
attributes: {},
children: [],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,6 @@ export function createSvgObjectsFromPcbSilkscreenText(
const transformedFontSize = font_size * Math.abs(transform.a)

// Remove ${} from text value and handle undefined text
const cleanedText = (text || "").replace(/\$\{|\}/g, "")
if (!cleanedText) {
return []
}

// Create a composite transformation
const textTransform = compose(
Expand All @@ -64,7 +60,7 @@ export function createSvgObjectsFromPcbSilkscreenText(
children: [
{
type: "text",
value: cleanedText,
value: text,
name: "",
attributes: {},
children: [],
Expand Down

0 comments on commit da442d9

Please sign in to comment.