bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26550: [PATCH] Fix js.el filling inline JSDoc tags


From: Etienne Prud'homme
Subject: bug#26550: [PATCH] Fix js.el filling inline JSDoc tags
Date: Tue, 18 Apr 2017 00:18:11 -0400

The attached patch fixes filling inline JSDoc tags in js-mode. JSDoc allows using tags in the form of:

> /**
>  * @foo
>  * Description. Link to other symbol {@link document.body.style}
>  * @bar

Where "@link" is the inline tag.

Currently, the paragraph starts at the "@" sign. Therefore filling the Description line would never make the "@bar" tag appear in an other column (that's what we want).

However, the link tag can be broken arbitrary and would make the tag harder to read (without considering font-lock that is implemented in an other package).

> /**
>  * @foo
>  * Description. Link to other symbol {@link
>  * document.body.style}
>  * @bar

I searched the JSDoc documentation[1] about line breaks inside an inline tags and didn't find explicit information about whether or not it was valid. Given that inline litterally means on one line, I guess we can pretend the specification doesn't allow line breaks inside an inline tag.


[1] http://usejsdoc.org/about-block-inline-tags.html

Attachment: 0001-Fix-js.el-filling-inline-JSDoc-tags.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]