mirror of
https://github.com/github/semantic.git
synced 2024-11-25 11:04:00 +03:00
Map ranges and stuff correctly.
This commit is contained in:
parent
865dbe2eed
commit
c01624abe9
@ -91,10 +91,12 @@
|
|||||||
|
|
||||||
/// Diff -> String -> String -> DOM
|
/// Diff -> String -> String -> DOM
|
||||||
function diffToDOM(diff, which, source) {
|
function diffToDOM(diff, which, source) {
|
||||||
return rangeAndSyntaxToDOM(diff.roll.extract[which], diff.roll.unwrap, source, function(diff) {
|
if (diff.pure != null) { return diff.pure; }
|
||||||
|
function getRange(diff) {
|
||||||
if (diff.pure != null) { return diff.pure["data-range"]; }
|
if (diff.pure != null) { return diff.pure["data-range"]; }
|
||||||
if (diff.roll != null) { return diff.roll.extract[which]; }
|
if (diff.roll != null) { return diff.roll.extract[which]; }
|
||||||
}, function(diff) { return diffToDOM(diff, which, source); })
|
}
|
||||||
|
return rangeAndSyntaxToDOM(getRange(diff), diff.roll.unwrap, source, getRange, function(diff) { return diffToDOM(diff, which, source); })
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Range -> Syntax a -> String -> (a -> Range) -> (a -> DOM) -> DOM
|
/// Range -> Syntax a -> String -> (a -> Range) -> (a -> DOM) -> DOM
|
||||||
|
Loading…
Reference in New Issue
Block a user