Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for extended text descriptions syntax (pro-only) #31

Closed
josteink opened this issue Jan 8, 2016 · 3 comments
Closed

Support for extended text descriptions syntax (pro-only) #31

josteink opened this issue Jan 8, 2016 · 3 comments

Comments

@josteink
Copy link
Owner

josteink commented Jan 8, 2016

As seen in the documentation, you can create extended text descriptions by having your text indented relative to the sequence script:

  This is the extended text description

A->: This is regular syntax

Implementing support for this syntax will involve a several challenges:

  1. Getting correct indentation while editing. This is probably the simplest thing to implement support for.
  2. Getting correct indentation if/when a user asks to reflow/reindent a whole document.
  3. Should this blocks have a particular kind of fontification? If so, fontification has to be aware of the current "proper" indentation level of each line.

Implementing full support for this feature is not a priority for several reasons:

  • Implementing support for 1 is probably doable, but will most likely introduce annoying bugs until 2 is fully supported too.
  • Implementing support for 3 will require an entire new kind of code-base for fontification and will most likely affect performance too.

CC: @dlasko

@josteink
Copy link
Owner Author

josteink commented Jan 8, 2016

Testing out this feature shows that "here be dragons".

Basically anything with a text-indent more than one space is considered a extended text description (ETD), unless recognized as normal WSD-syntax.

While this at first makes it seem easier to fully support, it comes with a few gotchas:

  • Every character after the initial space is considered part of the ETD.
  • Consecutive lines without a paragraph break is considered a paragragph.

This means that ETDs indented at the same level as other markup will look funny.

Consider the following script:


title Demo document

opt Indetation and EDT
    alt EDTs gets indented deep

         Bob talks to Alice.
         Alice suggest coffee.

        Bob->Alice: Hey!

    end
end

Which will render like this:

test2

That's obviously no good.

To support this feature properly, wsd-mode will need to pre-process such text-blocks before sending them to the WSD website. An alternate approach to this particular issue is submitting a bug-report to the WSD website itself.

@josteink josteink changed the title Support for extended text descriptions (pro-only) Support for extended text descriptions syntax (pro-only) Jan 17, 2016
@josteink
Copy link
Owner Author

A bug-report has been filed on this particular issue. Work on this issue may resume later based on the outcome.

@josteink
Copy link
Owner Author

Bug-report has been received and fixed on the wsd website.

This means a solution can be drafted for wsd-mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant