fix lu parser error when invalid square brackets occur in utterances#825
fix lu parser error when invalid square brackets occur in utterances#825
Conversation
|
@vishwacsena @munozemilio could you please help to take a look at this PR? |
|
Not sure I follow why this is not an error .. can you clarify? []
[
] |
|
@vishwacsena. It is 100% error and it will throw out. The changes here is to make sure the next valid intent section is not impacted by this error when parsing. Composer is using the lu parser in their lu editor. They want lu parser to have the capability of parsing with errors which means error text in current section can be pased into Body (even though the errors are caught)and errors in current section doesn't impact next valid section parsing. For example, Considering below lu content The parsed lu resource will have error of |
fix #795. Before the fix, the square brackets occur after an intent will be treated as import section which caused the intent body missed the error intent line. After the fix, the invalid square brackets will be treated as error intent line instead of import section so that it can be included in the body of the intent.