asciidoctor / atom-language-asciidoc

⚛ AsciiDoc language package for the Atom editor.
https://atom.io/packages/language-asciidoc
MIT License
42 stars 20 forks source link

feat: multi-lines #116

Closed ldez closed 8 years ago

ldez commented 8 years ago

Basic multi-lines for unambiguous elements.

ldez commented 8 years ago

@nicorikken @mojavelinux Is that kind of behavior acceptable to you?

foobar

footnoteref:[id, text text
text text text]

foobar

footnoteref:[id, text text
text text
text

foobar

capture du 2016-05-12 19-56-31

nicorikken commented 8 years ago

Somewhat better, assuming people don't make mistakes like leaving out the closing brackets. But that would better be handled using a linter. this highlighting assumes a valid Asciidoctor syntax, which I think is fine. It breaks gracefully though 😸 Some of my edge case testing:

screen shot 2016-05-12 at 20 04 15
foobar

footnoteref:[id, text text
text text text]

foobar

footnoteref:[id, text text
text text
text

foobar

I think this is still better than the single-line variant.

ldez commented 8 years ago

If you assuming this is possible, I apply this to:

nicorikken commented 8 years ago

Certainly I think you can add this to the other constructs with a similar (bounded) syntax. That leave only the more conflicting constructs up for debate.

ldez commented 8 years ago

I can do that:

capture du 2016-05-12 21-16-12

Is this expected behavior?

ldez commented 8 years ago

It's ready to review.

Say me if spaces at the ending of line are invalid characters.

ldez commented 8 years ago

I have also fixed all macros for respect naming conventions and styling.

nicorikken commented 8 years ago

I see no breakage in practical coloring (due to renaming). Code is nice. Spaces at the end seem to render neatly in Asciidoc preview plugin, so would be valid. As long as the macro is closed.

This can be merged.

mojavelinux commented 8 years ago

Say me if spaces at the ending of line are invalid characters.

The first thing the converter does is strip all trailing whitespace. So technically it is valid because it is ignored. But we could highlight it as an error to show that it will get stripped away and is thus superfluous.

mojavelinux commented 8 years ago

Somewhat better, assuming people don't make mistakes like leaving out the closing brackets. But that would better be handled using a linter.

True. It's also unavoidable given the current behavior of first-mate. They really, really, really need to add a way to validate the inner content against a spec. Right now, this is the very best we can do.