mirror of
https://github.com/isocpp/CppCoreGuidelines.git
synced 2025-12-18 21:24:41 +03:00
Fix duplicate/wrong anchors. Fix Makefile uniq check for anchors, must sort
This commit is contained in:
@@ -55,7 +55,7 @@ show-diff: nodejs/node_modules/remark nodejs/remark/.remarkrc $(SOURCEPATH) $(BU
|
||||
check-references: $(SOURCEPATH) $(BUILD_DIR) Makefile
|
||||
## check references unique
|
||||
rm -f $(BUILD_DIR)/$(SOURCEFILE).uniq
|
||||
grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
|
||||
@grep -oP '(?<=<a name=")[^\"]+' $(SOURCEPATH) | sort | uniq -d > $(BUILD_DIR)/$(SOURCEFILE).uniq
|
||||
## check if output has data
|
||||
if [ -s "build/CppCoreGuidelines.md.uniq" ]; then echo 'Found duplicate anchors:'; cat $(BUILD_DIR)/$(SOURCEFILE).uniq; false; fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user