Skip to content

Conversation

@sofiushko
Copy link
Contributor

No description provided.

@yc-ui-bot
Copy link
Contributor

Preview is ready.

@d3m1d0v d3m1d0v changed the title Add data-line atts support for heading and paragraph Add data-line attrs support for heading and paragraph Nov 16, 2023

return [
'p',
lineNumber === undefined ? {} : {headingLineNumberAttr: lineNumber},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

{default: null}

so maybe check should be lineNumber === null ?

{headingLineNumberAttr: lineNumber}

square brackets is missed: {[headingLineNumberAttr]: lineNumber}

Paragraph = 'paragraph',
}

const headingLineNumberAttr = 'data-line';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

headingLineNumberAttr

it's paragraph's attribute name)


return [
'h' + node.attrs[headingLevelAttr],
lineNumber === undefined ? {} : {headingLineNumberAttr: lineNumber},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@sofiushko sofiushko closed this Nov 16, 2023
@sofiushko
Copy link
Contributor Author

#158

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants