Skip to content

Commit

Permalink
Merge pull request #18 from jclem/reduce-history-pollution
Browse files Browse the repository at this point in the history
Reduce extra history entries
  • Loading branch information
knsv authored May 13, 2020
2 parents 9f8b5af + 65d6760 commit d6e947c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/code-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ export const fromUrl = data => {
};
export const updateCodeStore = newState => {
codeStore.set(newState);
push('/edit/' + Base64.encodeURI(JSON.stringify(newState)))
replace('/edit/' + Base64.encodeURI(JSON.stringify(newState)))
};
2 changes: 1 addition & 1 deletion src/components/Config.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const handleConfUpdate = conf => {
console.log('Error in parsed', e);
configErrorStore.set(e);
const str = JSON.stringify({ code, mermaid: oldConf });
push('/edit/' + Base64.encodeURI(str))
replace('/edit/' + Base64.encodeURI(str))
}
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/Editor.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const handleCodeUpdate = code => {
codeErrorStore.set(e);
console.log('Error in parsed', e.hash);
const str = JSON.stringify({ code: code, mermaid: conf });
push('/edit/' + Base64.encodeURI(str))
replace('/edit/' + Base64.encodeURI(str))
const l = e.hash.line;
decArr.push(edit.deltaDecorations([], [
{ range: new monaco.Range(e.hash.loc.first_line,e.hash.loc.last_line,e.hash.loc.first_column,e.hash.loc.last_column), options: { inlineClassName: 'myInlineDecoration' }}]
Expand Down

0 comments on commit d6e947c

Please sign in to comment.