Skip to content

Document behaviour of dictionary.insert() when key exists - #282

Merged
laurmaedje merged 2 commits into
typst:mainfrom
KiruyaMomochi:dict-doc
Mar 25, 2023
Merged

laurmaedje merged 2 commits into
typst:mainfrom
KiruyaMomochi:dict-doc

Conversation

@KiruyaMomochi

Copy link
Copy Markdown
Contributor
  1. Current documentation for insert method of dictionary does not explain what happens if the key exists before inserting. Since our implementation uses std::collection::BTreeMap, the actual behavior is to update the old value. This PR adds the corresponding description to the documentation.
  2. Add Documentation for how to check if a key is present in the dictionary.

@KiruyaMomochi KiruyaMomochi changed the title Document behaviour of dictionary.insert() when key exists, etc. Document behaviour of dictionary.insert() when key exists Mar 24, 2023
Comment thread docs/src/reference/types.md Resolved
@laurmaedje
laurmaedje merged commit d0782b1 into typst:main Mar 25, 2023
yipinliu pushed a commit to yipinliu/typst that referenced this pull request Mar 27, 2023
* 'main' of https://github.com/typst/typst: (22 commits)
  Added IPA pronunciation (typst#349)
  Cache eviction helps
  Pronunciation
  Don't let the build script overwrite TYPST_VERSION (typst#154)
  Document behaviour of dictionary.insert() when key exists (typst#282)
  Add custom font search path support for typst cli (typst#270)
  Added return type to methods of colors in docs (typst#291)
  change page numbering for outline (typst#284)
  Newton's notation for derivatives (typst#281)
  Use correct smart quotes for Norwegian Bokmål language code (typst#278)
  Fix fill color obstructing page header and background (typst#277)
  Simplify heading block example
  Fix index out of bounds error in build script (typst#173)
  Replace infinite repeat layout panic with error (typst#235)
  Changed "ColorChoice::Always" to "ColorChoice::Auto" to honour user setting of TERM / NO_COLOR (typst#230)
  Fixed Typo (typst#227)
  Fix descriptions of some types (typst#206)
  Fix import syntax in tutorial (typst#205)
  Make alignment actually centered (typst#176)
  strip cli target (typst#143)
  ...
Dikluwe pushed a commit to Dikluwe/typst-crystalline that referenced this pull request Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants