Skip to content

Commit 22891e1

Browse files
authored
Merge pull request #3080 from plotly/alexcjohnson-patch-1
More flexible reading of component docstrings
2 parents 9566578 + 021f540 commit 22891e1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

Diff for: CHANGELOG.md

+8-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [UNRELEASED]
6+
7+
## Fixed
8+
9+
- [#3080](https://github.com/plotly/dash/pull/3080) Fix docstring generation for components using single-line or nonstandard-indent leading comments
10+
511
## [2.18.2] - 2024-11-04
612

713
## Fixed
@@ -89,7 +95,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
8995
## Fixed
9096

9197
- [#2362](https://github.com/plotly/dash/pull/2362) Global namespace not polluted any more when loading clientside callbacks.
92-
- [#2833](https://github.com/plotly/dash/pull/2833) Allow data url in link props. Fixes [#2764](https://github.com/plotly/dash/issues/2764)
98+
- [#2833](https://github.com/plotly/dash/pull/2833) Allow data url in link props. Fixes [#2764](https://github.com/plotly/dash/issues/2764)
9399
- [#2822](https://github.com/plotly/dash/pull/2822) Fix side update (running/progress/cancel) dict ids. Fixes [#2111](https://github.com/plotly/dash/issues/2111)
94100
- [#2817](https://github.com/plotly/dash/pull/2817) Change hashing algorithm from md5 to sha256, Fixes [#2697](https://github.com/plotly/dash/issues/2697).
95101
- [#2816](https://github.com/plotly/dash/pull/2816) Fix dcc.Dropdown value not updated when option is removed. Fixes [#2733](https://github.com/plotly/dash/issues/2733).
@@ -116,7 +122,7 @@ This project adheres to [Semantic Versioning](https://semver.org/).
116122
## Added
117123
- [#2762](https://github.com/plotly/dash/pull/2762) Add dynamic loading of component libraries.
118124
- Add `dynamic_loading=True` to dash init.
119-
- Add `preloaded_libraries=[]` to dash init, included libraries names will be loaded on the index like before.
125+
- Add `preloaded_libraries=[]` to dash init, included libraries names will be loaded on the index like before.
120126
- [#2758](https://github.com/plotly/dash/pull/2758)
121127
- exposing `setProps` to `dash_clientside.clientSide_setProps` to allow for JS code to interact directly with the dash eco-system
122128
- [#2730](https://github.com/plotly/dash/pull/2721) Load script files with `.mjs` ending as js modules

Diff for: dash/extract-meta.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ function gatherComponents(sources, components = {}) {
728728

729729
if (propsType) {
730730
if (
731-
propsType.valueDeclaration &&
731+
propsType.valueDeclaration &&
732732
propsType.valueDeclaration.name &&
733733
propsType.valueDeclaration.name.elements &&
734734
propsType.valueDeclaration.name.elements.length
@@ -762,7 +762,7 @@ function gatherComponents(sources, components = {}) {
762762
fullText
763763
.slice(r.pos + 4, r.end - 3)
764764
.split('\n')
765-
.map(s => s.slice(3, s.length))
765+
.map(s => s.replace(/^(\s*\*?\s)/, ''))
766766
.filter(e => e)
767767
.join('\n')
768768
)

0 commit comments

Comments
 (0)