Skip to content

Commit 8b49a45

Browse files
author
Ibon Tolosana
committed
Update readme.md
1 parent 88f9105 commit 8b49a45

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

readme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ Transition:
128128

129129
A natural transition flow of executed actions for a transition from StateA to StateB will be:
130130

131-
<code>
131+
```
132132
StateA.onExit() -> Transition.onTransition() -> StateB.onEnter()
133-
</code>
133+
```
134134

135135
Those hooks are defined in the **FSM JSON** definition as in the example:
136136

@@ -242,7 +242,7 @@ The difference is straight:
242242
A natural transition flow of executed actions for a transition from StateA to StateB with preGuard and postGuard actions
243243
will be:
244244

245-
<code>
245+
```
246246
if preGuard throws exception
247247
// nothing will happen
248248
nil;
@@ -256,11 +256,11 @@ else
256256
StateA.onExit -> Transition.onTransition -> StateB.onEnter
257257
endif
258258
endif
259-
</code>
259+
```
260260

261261
The way to instrument the engine that a guard veto has been launched, will be by throwing an exception from the
262262
pre/post-transition functions. A Guard is expected to throw a GuardException object by calling
263-
<code>transition.createThrowable</code> method.
263+
`transition.createThrowable`method.
264264
Those functions are optional, and must be set in the "transition" block of the
265265
FSM definition as follows:
266266

@@ -913,4 +913,4 @@ session.printStackTrace();
913913

914914
// prints: session empty.
915915

916-
```
916+
```

0 commit comments

Comments
 (0)