Long boundary names render a literal "\n" in the DFD

オープン
#379 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 3 日以内に返信

まだ誰も着手していません。

  • #380 @markthomaschurch による — マージされずにクローズ

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python

調査の方向性

Start by reading Element._label() and the boundary label generation described in the issue. Reproduce the case with Boundary("University of Michigan") and inspect the generated DOT label. Done means the boundary label uses HTML line breaks between escaped wrapped lines and renders on separate lines; pull request #380 is already open for this issue.

索引モデルが issue の本文から書いたものです。

説明

Description

Long boundary names are drawn with a literal \n in the DFD instead of being split across lines.

For example, Boundary("University of Michigan") is displayed as University of\nMichigan.

Reproduction

from pytm import TM, Boundary, Server

tm = TM("example")
b = Boundary("University of Michigan")
Server("Web Server", inBoundary=b)
tm.process()
python example.py --dfd | dot -Tsvg -o dfd.svg

The generated DOT contains label = <<i>University of\nMichigan</i>>;.

Cause

Element labels are wrapped at 18 characters and the lines joined with the \n escape (Element._label()). That works for quoted labels (label = "..."). Boundaries, however, use Graphviz HTML-like labels (label = <<i>...</i>>, added for italics and escaped in #360), and HTML-like labels don't interpret \n; line breaks there must be <br/>.

Proposed fix

Build boundary labels by HTML-escaping each wrapped line and joining the lines with <br/>.

主要言語
Python
スター
1.2k
フォーク
237
平均マージ
4日 2時間
マージ済み PR(30日)
9

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

OWASP/pytm のほかの issue

OWASP/pytm の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。