Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent code-token attribute in deltas #2259

Merged
merged 2 commits into from
Aug 21, 2018
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
exclude code-token format specifically
  • Loading branch information
dgreensp committed Aug 20, 2018
commit db9cbcea31da4e0a7a60b19c2c2197c07363bb7f
7 changes: 3 additions & 4 deletions blots/block.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,11 +178,10 @@ function blockDelta(blot) {

function bubbleFormats(blot, formats = {}) {
if (blot == null) return formats;
if (
typeof blot.formats === 'function' &&
blot.statics.blotName !== 'code-token'
) {
if (typeof blot.formats === 'function') {
formats = extend(formats, blot.formats());
// exclude syntax highlighting from deltas and getFormat()
delete formats['code-token'];
}
if (
blot.parent == null ||
Expand Down