mirror of
https://github.com/mattn/emmet-vim.git
synced 2025-12-08 19:44:47 +08:00
Fix numbering on nested multiplication
If an element is being multiplied, its number should reflect the repeating of that element, not the group it belongs in. ---- Example case: Input: .outer$*3>.inner$*2 Expected output: <div class="outer1"> <!-- two DIVs: .inner1, .inner2 --> </div> <div class="outer2"> <!-- two DIVs: .inner1, .inner2 --> </div> <div class="outer3"> <!-- two DIVs: .inner1, .inner2 --> </div> Observed output: <div class="outer1"> <!-- two DIVs: .inner1, .inner2 --> </div> <div class="outer2"> <!-- two DIVs: .inner2, .inner2 --> </div> <div class="outer3"> <!-- two DIVs: .inner3, .inner3 --> </div>
This commit is contained in:
@@ -169,7 +169,7 @@ function! emmet#toString(...)
|
|||||||
let rtype = emmet#lang#exists(type) ? type : 'html'
|
let rtype = emmet#lang#exists(type) ? type : 'html'
|
||||||
while itemno < current.multiplier
|
while itemno < current.multiplier
|
||||||
if len(current.name)
|
if len(current.name)
|
||||||
if group_itemno != 0
|
if current.multiplier == 1
|
||||||
let inner = emmet#lang#{rtype}#toString(s:emmet_settings, current, type, inline, filters, group_itemno, indent)
|
let inner = emmet#lang#{rtype}#toString(s:emmet_settings, current, type, inline, filters, group_itemno, indent)
|
||||||
else
|
else
|
||||||
let inner = emmet#lang#{rtype}#toString(s:emmet_settings, current, type, inline, filters, itemno, indent)
|
let inner = emmet#lang#{rtype}#toString(s:emmet_settings, current, type, inline, filters, itemno, indent)
|
||||||
|
|||||||
Reference in New Issue
Block a user