File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -602,14 +602,15 @@ BEGIN
602602 ,(CONCAT(CHAR(13), CHAR(10), ' ' <details><summary>Click to expand</summary>' ' ));' +
603603
604604 -- Object definition
605- + N' IF (@LimitStoredProcLength = 1)
605+ + N'
606+ IF (@LimitStoredProcLength = 1 AND LEN(OBJECT_DEFINITION(@objectid)) > 8000)
606607 BEGIN;
607608 INSERT INTO #markdown (value)
608609 VALUES (CONCAT(CHAR(13), CHAR(10), ' ' ```sql' ' ,
609610 CHAR(13), CHAR(10), CAST(OBJECT_DEFINITION(@objectid) AS VARCHAR(8000))))
610- ,(' ' /************************************************************************************************** /' ' )
611- ,(' ' /* sp_doc: Contents truncated at 8000 characters. Set @LimitStoredProcLength = 0 to remove limit . */' ' )
612- ,(' ' /************************************************************************************************** /' ' )
611+ ,(' ' /************************************************************************************************/' ' )
612+ ,(' ' /* sp_doc: Max 8000 characters reached . Set @LimitStoredProcLength = 0 to show full definition . */' ' )
613+ ,(' ' /************************************************************************************************/' ' )
613614 ,(' ' ```' ' );
614615 END;
615616 ELSE
You can’t perform that action at this time.
0 commit comments