CommonDoc / scriba

A markup language with Scribe syntax
http://commondoc.github.io/scriba/docs/overview.html
19 stars 5 forks source link

Scriba dislikes smiles #7

Open svetlyak40wt opened 3 years ago

svetlyak40wt commented 3 years ago

It unable to parse document with a smile. Here is a few examples:

CL-USER> (scriba::string-to-common-doc "Scriba breaks on smile :( why?")

CL-USER> (scriba::string-to-common-doc "Scriba breaks on smile :)")

They lead to errors like this:

At end of input

  Scriba breaks on smile :( why?
                                ^ (Line 1, Column 30, Position 30)

In context TAG-BODY:

While parsing TAG-BODY. Expected:

     the character ( (LEFT_PARENTHESIS)
  or the character ) (RIGHT_PARENTHESIS)
  or the character @ (COMMERCIAL_AT)
  or <end of input>
  or anything but     the character ( (LEFT_PARENTHESIS)
                  and the character ) (RIGHT_PARENTHESIS)
                  and the character @ (COMMERCIAL_AT)
   [Condition of type ESRAP:ESRAP-PARSE-ERROR]

Restarts:
 0: [RETRY] Retry SLY mREPL evaluation request.
 1: [*ABORT] Return to SLY's top level.
 2: [ABORT] abort thread (#<THREAD "sly-channel-1-mrepl-remote-1" RUNNING {10036BD7C3}>)

Backtrace:
 0: (ESRAP:ESRAP-PARSE-ERROR "Scriba breaks on smile :( why?" #<ESRAP::SUCCESSFUL-PARSE SCRIBA.PARSER:DOCUMENT @24>)
 1: (SCRIBA.PARSER:PARSE-STRING "Scriba breaks on smile :( why?")
 2: (SCRIBA.PLUMP:PARSE "Scriba breaks on smile :( why?")
 3: (SCRIBA::STRING-TO-COMMON-DOC "Scriba breaks on smile :( why?")