This revision was automatically updated to reflect the committed changes.
Closed by commit rL296467: Blacklist arbitrary @\\w+ JSDoc tags from wrapping.
(authored by mprobst).
Changed prior to commit:
https://reviews.llvm.org/D30452?vs=8=90001#toc
Repository:
rL LLVM
mprobst marked an inline comment as done.
mprobst added inline comments.
Comment at: lib/Format/Format.cpp:624
+// taze:, and @tag followed by { for a lot of JSDoc tags.
+GoogleStyle.CommentPragmas = "(taze:|(@[A-Za-z_0-9-]*[ \\t]*{))";
djasper accepted this revision.
djasper added inline comments.
This revision is now accepted and ready to land.
Comment at: lib/Format/Format.cpp:624
+// taze:, and @tag followed by { for a lot of JSDoc tags.
+GoogleStyle.CommentPragmas = "(taze:|(@[A-Za-z_0-9-]*[
mprobst updated this revision to Diff 8.
mprobst added a comment.
- Match \\w* for all JSDoc param tags.
https://reviews.llvm.org/D30452
Files:
lib/Format/Format.cpp
unittests/Format/FormatTestJS.cpp
Index: unittests/Format/FormatTestJS.cpp
djasper added inline comments.
Comment at: lib/Format/Format.cpp:627
+"(@("
+"const|"
+"define|"
I'd vote for making this "@\w*\ *{". We have seen incorrectly spelled version
and such of this in the past.
mprobst created this revision.
Herald added a subscriber: klimek.
Limit the blacklisting to only apply when the tag is actually followed by a
parameter in curly braces.
/** @mods {long.type.must.not.wrap} */
vs
/** @const this is a long description that may wrap. */
JSDoc tag reference