Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
E
Editoria Typescript
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 8
    • Issues 8
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 1
    • Merge Requests 1
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • XSweet
  • Editoria Typescript
  • Issues
  • #40

Closed
Open
Opened Oct 06, 2018 by Alex Theg@atheg
  • Report abuse
  • New issue
Report abuse New issue

Preserve inline formatting on note callouts

The editors at UCP have found a strange bug related to how notes appear in Wax when the note callouts (the inline note numbers in the main content) have inline formatting applied to them (underlining, italics, bold, etc.).

The root cause of the issue is a bug with the Substance Javascript library that Wax is built with, but we can avoid the bug altogether with a tweak to XSweet:

If a note callout has inline formatting tags applied to it, those tags are preserved in the final HTML extraction from XSweet core. But, when Typescript transforms the note and callout formats from their HTML to the Wax-specific note and callout format, any inline formatting tags applied on the note callout are dropped.

The fix for the bug is to update Typescript to preserve inline formatting tags on the note callouts all the way through Typescript.

Here's an example of an instance that causes the bug in Substance:

The original Word .docx here has an italicized note callout. The whole paragraph is italicized, with italics before, on, and after the note callout:

Screen_Shot_2018-09-24_at_10.32.27_AM

Here's the result of XSweet Core - the inline italics on the note callout is still there (the <i>s inside the < span class=EndnoteReference">) :

<p style="font-size: 14pt">
  <span style="font-size: 14pt">“
    <i>When you go out to battle... that makes war with you, until it is subdued.</i>
    <span class="EndnoteReference">
      <i><a class="endnoteReference" href="#en6">6</a></i>
    </span>
    <i>“</i>
  </span>
</p>

And, you can see that in this final result that's ported into Editoria, the <i> tags have all been converted to <em> tags, and the tags within the note callout have been dropped:

<p>"
  <em>When you go out to battle that makes war with you, until it is subdued.
  </em>
  <note data-id="en6" />
  <em>"</em>
</p>

The request for this ticket is: if there are <u>, <b>, or <em> tags enclosing a note callout, preserve those through Typescript.

Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
1
Labels
Todo
Assign labels
  • View project labels
Reference: XSweet/editoria_typescript#40