Table swapping columns

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Table swapping columns

corneil
I have a series of files containing a table that was generated by a utility to visualize finite state machine models.

In one file the columns are randomly swapped around. I'm wondering if there is some character I should be escaping.
I am working in IntelliJ and it may be a bug specific to the plugin. Rendering HTML or PDF in IntelliJ has the same incorrect result in the one case only.

This is the problematic one:
secure-turnstile.adoc

= SecureTurnstileFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)&&overrideActive}]`
| LOCKED
|  `{ cancelOverride() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)}]`
| LOCKED
|  `{ activateOverride() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)overrideActive||isValidCard(cardId)}]`
| UNLOCKED
|  `{ unlock() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId){"cardId is required"}!isValidCard(cardId)}]`
| LOCKED
|  `{cardId-> requireNotNull(cardId) invalidCard(cardId) }`

| UNLOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)}]`
| LOCKED
|  `{ lock() }`

| UNLOCKED
| PASS
| LOCKED
|  `{ lock() }`
|===


This one is fine:
turnstile.adoc


= TurnstileFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| LOCKED
| COIN
| UNLOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(locked=false,message="")  }`

| UNLOCKED
| PASS
| LOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(locked=true,message="")  }`

| UNLOCKED
| COIN
| UNLOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(message="Return Coin")  }`
|===

A more complex one that also renders correctly:
packet-reader.adoc

= PacketReaderFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| [*]
| CTRL `[{byte->byte == CharacterConstants.SOH}]`
| RCVPCKT
| 

| RCVPCKT
| CTRL `[{byte->byte == CharacterConstants.STX}]`
| RCVDATA
|  `{  addField()  }`

| RCVPCKT
| BYTE
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`

| RCVDATA
| BYTE
| RCVDATA
|  `{byte->  require(byte != null)  addByte(byte)  }`

| RCVDATA
| CTRL `[{byte->byte == CharacterConstants.ETX}]`
| RCVPCKT
|  `{  endField()  }`

| RCVDATA
| ESC
| RCVESC
| 

| RCVESC
| ESC
| RCVDATA
|  `{  addByte(CharacterConstants.ESC)  }`

| RCVESC
| CTRL
| RCVDATA
|  `{byte->  require(byte != null)  addByte(byte)  }`

| RCVCHK
| BYTE
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`

| RCVCHK
| ESC
| RCVCHKESC
| 

| RCVCHK
| CTRL `[{byte->byte == CharacterConstants.EOT}]`
| CHKSUM
|  `{  checksum()  }`

| CHKSUM
| \<<automatic>> `[{!checksumValid}]`
| [*]
|  `{  sendNACK()  }`

| CHKSUM
| \<<automatic>> `[{checksumValid}]`
| [*]
|  `{  sendACK()  }`

| RCVCHKESC
| ESC
| RCVCHK
|  `{  addChecksum(CharacterConstants.ESC)  }`

| RCVCHKESC
| CTRL
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`
|===
Reply | Threaded
Open this post in threaded view
|

Re: Table swapping columns

mojavelinux
Administrator
This is the problematic cell:

| CARD `[{cardId->requireNotNull(cardId)overrideActive||isValidCard(cardId)}]`

It contains a column delimiter (2 of them, in fact). Those characters either need to be escaped, or you need to use a different character as the cell separator.


Best,

-Dan

On Sat, Feb 8, 2020 at 3:43 PM corneil [via Asciidoctor :: Discussion] <[hidden email]> wrote:
I have a series of files containing a table that was generated by a utility to visualize finite state machine models.

In one file the columns are randomly swapped around. I'm wondering if there is some character I should be escaping.
I am working in IntelliJ and it may be a bug specific to the plugin. Rendering HTML or PDF in IntelliJ has the same incorrect result in the one case only.

This is the problematic one:
secure-turnstile.adoc
= SecureTurnstileFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)&&overrideActive}]`
| LOCKED
|  `{ cancelOverride() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)}]`
| LOCKED
|  `{ activateOverride() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId)overrideActive||isValidCard(cardId)}]`
| UNLOCKED
|  `{ unlock() }`

| LOCKED
| CARD `[{cardId->requireNotNull(cardId){"cardId is required"}!isValidCard(cardId)}]`
| LOCKED
|  `{cardId-> requireNotNull(cardId) invalidCard(cardId) }`

| UNLOCKED
| CARD `[{cardId->requireNotNull(cardId)isOverrideCard(cardId)}]`
| LOCKED
|  `{ lock() }`

| UNLOCKED
| PASS
| LOCKED
|  `{ lock() }`
|===


This one is fine:
turnstile.adoc

= TurnstileFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| LOCKED
| COIN
| UNLOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(locked=false,message="")  }`

| UNLOCKED
| PASS
| LOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(locked=true,message="")  }`

| UNLOCKED
| COIN
| UNLOCKED
|  `{info->  require(info != null){"Info required"}  info.copy(message="Return Coin")  }`
|===

A more complex one that also renders correctly:
packet-reader.adoc
= PacketReaderFSM State Chart

== Default State Map

|===
| Start | Event[Guard] | Target | Action

| [*]
| CTRL `[{byte->byte == CharacterConstants.SOH}]`
| RCVPCKT
| 

| RCVPCKT
| CTRL `[{byte->byte == CharacterConstants.STX}]`
| RCVDATA
|  `{  addField()  }`

| RCVPCKT
| BYTE
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`

| RCVDATA
| BYTE
| RCVDATA
|  `{byte->  require(byte != null)  addByte(byte)  }`

| RCVDATA
| CTRL `[{byte->byte == CharacterConstants.ETX}]`
| RCVPCKT
|  `{  endField()  }`

| RCVDATA
| ESC
| RCVESC
| 

| RCVESC
| ESC
| RCVDATA
|  `{  addByte(CharacterConstants.ESC)  }`

| RCVESC
| CTRL
| RCVDATA
|  `{byte->  require(byte != null)  addByte(byte)  }`

| RCVCHK
| BYTE
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`

| RCVCHK
| ESC
| RCVCHKESC
| 

| RCVCHK
| CTRL `[{byte->byte == CharacterConstants.EOT}]`
| CHKSUM
|  `{  checksum()  }`

| CHKSUM
| \<<automatic>> `[{!checksumValid}]`
| [*]
|  `{  sendNACK()  }`

| CHKSUM
| \<<automatic>> `[{checksumValid}]`
| [*]
|  `{  sendACK()  }`

| RCVCHKESC
| ESC
| RCVCHK
|  `{  addChecksum(CharacterConstants.ESC)  }`

| RCVCHKESC
| CTRL
| RCVCHK
|  `{byte->  require(byte != null)  addChecksum(byte)  }`
|===



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Table-swapping-columns-tp7613.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen | @mojavelinux | https://twitter.com/mojavelinux
Reply | Threaded
Open this post in threaded view
|

Re: Table swapping columns

corneil
Thank you for a prompt response!!