Line 13: |
Line 13: |
| node_and_color = "^%s*(%a)%s*/%s*(%S+)%s*$", | | node_and_color = "^%s*(%a)%s*/%s*(%S+)%s*$", |
| node_and_color2 = "^%s*(%a)%s*/%s*(%S+)%s*/%s*(%S+)%s*$", | | node_and_color2 = "^%s*(%a)%s*/%s*(%S+)%s*/%s*(%S+)%s*$", |
− | node = "^%s*([%a%d])%s*$", | + | node = "^%s*([%a%d]+)%s*$", |
| digit_node = "^%s*%d%s*$", | | digit_node = "^%s*%d%s*$", |
| }, | | }, |
Line 42: |
Line 42: |
| | | |
| -- .kcRoute is defined in MediaWiki:Common.css | | -- .kcRoute is defined in MediaWiki:Common.css |
− | _node_template = [[<div class="kcRoute" style="vertical-align:middle"><div class="kcRouteNode" style="background:${color};">${label}</div></div>]], | + | _node_template = [[<div class="kcRoute" style="vertical-align:middle"><div class="${class}" style="background:${color};">${label}</div></div>]], |
| | | |
| _node_color2 = [[linear-gradient(90deg, ${color1} 50%, ${color2} 50%)]], | | _node_color2 = [[linear-gradient(90deg, ${color1} 50%, ${color2} 50%)]], |
Line 146: |
Line 146: |
| self._node_template, | | self._node_template, |
| label = label, | | label = label, |
| + | class = #label > 1 and "kcRouteNodeWide" or "kcRouteNode", |
| color = label:match(self._grammar.digit_node) | | color = label:match(self._grammar.digit_node) |
| and self._node_colors.grey | | and self._node_colors.grey |