Explorar o código

海报标题去除换行符

lifuxiong %!s(int64=4) %!d(string=hai) anos
pai
achega
5c134fd8a2
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      utils/poster.js

+ 1 - 1
utils/poster.js

@@ -89,7 +89,7 @@ export default class Poster {
           case "content":
             canvasObj.views.push({
               type: "text",
-              text: what,
+              text: what.replace(/[\r\n]/g, ""),
               css: {
                 left: `${left}px`,
                 top: `${top}px`,