Do not encode ADF macro for ordered lists that don't start at order 1

Issue #110 new
Omair Shakeel created an issue

If the input ADF contains orderedList type nodes that do not start with order: 1 then the ADF library currently attempts to preserve that with an ADF macro, whereas the CS does a lossy conversion. For example:

Input ADF:

{"type":"orderedList","attrs":{"order":2},"content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"text":"Good night world!","type":"text","marks":[{"type":"strong"}]}]}]}]},{"type":"paragraph","content":[]}],"version":1}}

CS Wiki result:

# *Good night world!*\n\n

ADF library’s Wiki result:

{adf:display=block}\n{\"type\":\"orderedList\",\"content\":[{\"type\":\"listItem\",\"content\":[{\"type\":\"paragraph\",\"content\":[{\"type\":\"text\",\"text\":\"Good night world!\",\"marks\":[{\"type\":\"strong\"}]}]}]}],\"attrs\":{\"order\":2}}\n{adf}\n\n")]]]

https://jplat.jira.atlassian.cloud/browse/ISSUE-18140

Comments (0)

  1. Log in to comment