Merge pull request #1054 from alixander/watch-title

fix watch title
This commit is contained in:
Alexander Wang 2023-03-17 20:38:11 -07:00 committed by GitHub
commit 40c0f4f605
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -2,6 +2,8 @@
#### Improvements 🧹 #### Improvements 🧹
- `<title>` attribute of HTML in watch mode is the base file name, instead of the whole path. [#1054](https://github.com/terrastruct/d2/pull/1054)
#### Bugfixes ⛑️ #### Bugfixes ⛑️
- Code blocks are not affected by uppercasing from special themes like Terminal. [#1053](https://github.com/terrastruct/d2/pull/1053) - Code blocks are not affected by uppercasing from special themes like Terminal. [#1053](https://github.com/terrastruct/d2/pull/1053)

View file

@ -433,7 +433,7 @@ func (w *watcher) handleRoot(hw http.ResponseWriter, r *http.Request) {
<div id="d2-err" style="display: none"></div> <div id="d2-err" style="display: none"></div>
<div id="d2-svg-container"></div> <div id="d2-svg-container"></div>
</body> </body>
</html>`, w.outputPath, w.devMode) </html>`, filepath.Base(w.outputPath), w.devMode)
} }
func (w *watcher) handleWatch(hw http.ResponseWriter, r *http.Request) error { func (w *watcher) handleWatch(hw http.ResponseWriter, r *http.Request) error {