Writing a document now leaves it as you wrote it: code blocks keep their blank lines, ordered lists keep their start number, djot emphasis stays intact, and updates that change nothing no longer touch the file. Commands no longer overwrite the wrong or existing files, single Chinese, Japanese and Korean characters are now found by lexical search, and files saved by other programs are read only once the save finishes. Thanks @lyingspring for the detailed reports behind most of these fixes.
iwe
Changed
- Djot documents follow the
increment_ordered_list_bulletssetting for ordered lists (previously items were always numbered in sequence)
Fixed
find --lexicalfinds a single Chinese, Japanese or Korean character inside longer text (previously only a character standing on its own was found)- Code blocks keep blank lines at their start and end (previously they were dropped whenever a document was written)
- A code block whose info string contains a backtick is written with a
~~~fence (previously it got a backtick fence that is not valid markdown, andnormalizethen turned the block into plain text) - Ordered lists keep their start number, so a list starting at
3.stays at3.(previously it was renumbered from1.) create,update --content,updateblock content andnormalize -kread djot in a djot workspace (previously the content was read as markdown, so*strong*became_emphasis_)- Keys that keep a document extension, such as
page.mdfor a file namedpage.md.md, select that document infind,delete,retrieve,update,rename,attach,normalize,$keyin--filterand other places that take a key (previously the extension was stripped again and the command acted onpage) retrieve --excluderemoves edges to exactly the excluded document when keys keep a document extension, such aspage.mdfor a file namedpage.md.md(previously edges topageandpage.mdwere confused)createandnewwith--if-exists fail,skiporsuffixno longer overwrite a document that another process writes between the existence check and the writeattachrefuses to overwrite a target file that exists but is not indexed, for example an ignored one (previously it replaced the file's content)updatewith a block operation that matches nothing, or--setto the value a field already has, leaves the document untouched (previously it could rewrite the file with formatting changes)- Memory session start no longer repeats a document whose key keeps a document extension in later sections (previously it could be listed twice)
iwes
Changed
- Formatting of djot documents follows the
increment_ordered_list_bulletssetting for ordered lists (previously items were always numbered in sequence)
Fixed
- Workspace symbol search finds a single Chinese, Japanese or Korean character inside longer text (previously only a character standing on its own was found)
- Files changed outside the editor are read once they finish saving (previously a file caught mid-save could be loaded empty or cut short)
- Formatting keeps blank lines at the start and end of a code block (previously they were dropped)
- Formatting writes a code block whose info string contains a backtick with a
~~~fence (previously it got a backtick fence that is not valid markdown) - Formatting keeps the start number of an ordered list, so a list starting at
3.stays at3.(previously it was renumbered from1.)
iwec
Fixed
iwe_querylexical search finds a single Chinese, Japanese or Korean character inside longer text (previously only a character standing on its own was found)- Files changed outside the server are read once they finish saving (previously a file caught mid-save could be loaded empty or cut short)
- Written documents keep blank lines at the start and end of a code block (previously they were dropped)
- Written documents use a
~~~fence for a code block whose info string contains a backtick (previously it got a backtick fence that is not valid markdown) - Written documents keep the start number of an ordered list, so a list starting at
3.stays at3.(previously it was renumbered from1.) iwe_queryupdate block content is read as djot in a djot workspace (previously it was read as markdown, so*strong*became_emphasis_)- Keys that keep a document extension, such as
page.mdfor a file namedpage.md.md, select that document iniwe_find,iwe_delete,iwe_retrieve,iwe_update,iwe_rename,iwe_attachand other tools that take a key (previously the extension was stripped again and the tool acted onpage) iwe_normalizewrites a document whose key keeps a document extension back to its own file (previously it could overwrite the file of the key without the extension)iwe_queryupdate with a block operation that matches nothing, or a$setto the value a field already has, leaves the document untouched and out ofchanged(previously every matched document was listed and could be rewritten with formatting changes)iwe_findrefs_toandrefs_fromselect documents linked to a key that keeps a document extension, such aspage.md(previously the extension was stripped and the tool usedpage)iwe_retrieveexcluderemoves edges to exactly the excluded document when keys keep a document extension (previously edges topageandpage.mdwere confused)
Library crates (liwe, diwe)
liwe
Added
Graph::resolve_existing_keyturns a user-supplied key into the key of an existing document, keeping a document extension when a document with that exact key exists
Changed
- Ordered lists carry their start number:
OrderedListhas astartfield,Node::OrderedList(u64)andBlock::OrderedList(u64, Vec<Blocks>)take it, andGraphBuilder::ordered_list,GraphBuilder::ordered_list_andandGraphNode::new_ordered_listrequire it (previously every ordered list started at 1) - Key filters keep keys as written (
KeyOpconstructors, anchor constructors and$keyparsing no longer strip.md/.dj), andevaluateresolves them against the graph (previously the extension was always stripped when the filter was built) Outcome::Updategains amatchedcount, andchangeslists only documents an operation actually changed (previously every matched document was listed)
Fixed
- Code block text is written as is apart from the final newline (previously leading and trailing blank lines were trimmed)
- Markdown code block whose info string contains a backtick is written with a
~~~fence (previously it got an invalid backtick fence) - Block update content in
$replace,$insertBefore,$insertAfterand$replaceTextis parsed in the graph's format (previously always as markdown)
diwe
Fixed
Bm25Indexindexes every single Chinese, Japanese and Korean character alongside character pairs, sosearchfinds a single character inside longer text (previously only a character standing on its own was found)start_watcherandstart_poll_watcherwait for a just-changed file to stop changing before reading it (previously a file caught mid-save could be reported empty or cut short)retrieveexclusion compares edge keys exactly, so excluding a key that keeps a document extension removes only its edges (previously the edge key's extension was stripped before comparing)