Skip to content

Commit

Permalink
Factored out constant for inline separator
Browse files Browse the repository at this point in the history
  • Loading branch information
1ec5 committed Jan 7, 2023
1 parent 2b35d9a commit 02cd1bc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/constants/label.js
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,19 @@ export const localizedName = [
listValuesExpression(["var", "localizedName"], "\n"),
];

/**
* The separator to use in inline contexts.
*/
const inlineSeparator = " \u2022 ";

/**
* The names in the user's preferred language, all on the same line.
*/
export const localizedNameInline = [
"let",
"localizedName",
"",
listValuesExpression(["var", "localizedName"], " \u2022 "),
listValuesExpression(["var", "localizedName"], inlineSeparator),
];

/**
Expand Down Expand Up @@ -442,7 +447,7 @@ export const localizedNameWithLocalGloss = [
// bother rendering it.
["concat", ["slice", ["var", "localizedName"], 0, 1], " "],
{ "font-scale": 0.001 },
listValuesExpression(["get", "name"], " \u2022 ", [
listValuesExpression(["get", "name"], inlineSeparator, [
"var",
"localizedName",
]),
Expand Down

0 comments on commit 02cd1bc

Please sign in to comment.